Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TLD's which are longer than 6 chars return false even though correct domain #112

Closed
benni347 opened this issue Jan 17, 2024 · 1 comment · Fixed by #149
Closed

TLD's which are longer than 6 chars return false even though correct domain #112

benni347 opened this issue Jan 17, 2024 · 1 comment · Fixed by #149
Assignees
Labels
bug Something isn't working
Milestone

Comments

@benni347
Copy link

Bug Description
There is an issue with the validation of top-level domains (TLDs) that exceed six characters in length. For instance, the URL https://spiezer.restaurant/restaurant is valid, yet it is erroneously flagged as invalid due to its 11-character TLD.

Steps to Reproduce
To replicate this behavior:

  1. Access the Lynx dashboard.
  2. Attempt to shorten the URL https://spiezer.restaurant/restaurant.

Expected Behavior
The expectation is that the URL would be successfully shortened without triggering an error message stating Invalid destination URL format, acknowledging its validity.

Desktop Configuration

  1. Operating Systems: Linux and macOS
  2. Browsers: Firefox, Chrome
  3. Version: 1.7.4

Additional Context
The validation logic for URLs should accommodate TLDs that are longer than six characters. The problematic code can be found here: URL validation check in code.

@benni347 benni347 added the bug Something isn't working label Jan 17, 2024
@JackBailey
Copy link
Member

JackBailey commented Jan 17, 2024

Ahh yep I'll need to fix that and will release the change soon.

In the meantime, you should be able to use URL_REGEX to override this: https://docs.getlynx.dev/installation/environment-variables#other

Thank you for using Lynx and submitting an issue.

@JackBailey JackBailey moved this to Todo in Roadmap Mar 1, 2024
@JackBailey JackBailey moved this from Todo to Done in Roadmap May 28, 2024
@JackBailey JackBailey added this to the 1.10.0 milestone May 28, 2024
@JackBailey JackBailey linked a pull request Jun 3, 2024 that will close this issue
JackBailey added a commit that referenced this issue Jun 3, 2024
* Update URL regex to allow for long tlds (#112)

* Bump version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants