You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior
According to mozilla the length of a top level domain allows up to 63 characters. The current ValidURL regex allows 6 characters only.
This results in false positives when checking valid URLs with more than 6 characters for a top level domain
The text was updated successfully, but these errors were encountered:
Describe the bug
Scala environment: JVM
Scala version: 3.4.2
Iron version: 2.6.0
Reproduction steps
The steps to reproduce the described issue
The above code throws an IllegalArgumentException
Expected behavior
Url.applyUnsafe("https://aaaaa-bbb-cccccc-dddddddd.eeeeeeee-fff.ggg.hhhhhhhhh:1234") should not throw an exception.
The following regex for ValidURL fixes the problem:
"((\\w+:)+\\/\\/)?(([-a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,63})|(localhost))(:\\d{1,5})?(\\/|\\/([-a-zA-Z0-9@:%_\\+.~#?&//=]*))?"
Current behavior
According to mozilla the length of a top level domain allows up to 63 characters. The current ValidURL regex allows 6 characters only.
This results in false positives when checking valid URLs with more than 6 characters for a top level domain
The text was updated successfully, but these errors were encountered: