Lynx icon indicating copy to clipboard operation
Lynx copied to clipboard

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

Open benni347 opened this issue 2 years ago • 1 comments

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 avatar Jan 17 '24 13:01 benni347

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 avatar Jan 17 '24 17:01 JackBailey