-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
UrlValidator component fails with one-char subdomain #43038
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
Comments
@MimoBerlino Would you like to give it a try? |
@xabbuh do you mean the regex has been adapted and ready to be tested/tried? |
No, sorry, I meant if you would like to try fixing the regex in a pull request. |
@xabbuh sure. I'll get the time to look at it. |
We're also seeing this same problem. |
@DfKimera Sure, any help is much appreciated :) |
…s (DfKimera) This PR was merged into the 4.4 branch. Discussion ---------- [Validator] Fixes URL validation for single-char subdomains | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #43038 | License | MIT | Doc PR | This fixes an issue with failing validations for valid URLs that have a single char in subdomains. This bug was originally introduced on this commit: 074539d Some additional test cases with this scenario for valid and invalid URLs were added. Commits ------- d28c3ff bug #43038 [Validator] Fixes URL validation for single-char subdomains.
* 4.4: Added italian missing translation Fix persian (fa) translation Add missing translation for Estonian Add validator missing french translation Add missing translation [Security][Validator] Add missing translations for Gallician (gl) Update validators.ar.xlf bug #43038 [Validator] Fixes URL validation for single-char subdomains.
* 5.3: Added italian missing translation Fix persian (fa) translation [Notifier][RocketChat] Fix undefined index for message id Add missing translation for Estonian Add validator missing french translation Add missing translation [Security][Validator] Add missing translations for Gallician (gl) Update validators.ar.xlf [Notifier] Fix 'Undefined array key' error in FirebaseTransport bug #43038 [Validator] Fixes URL validation for single-char subdomains.
* 5.4: Added italian missing translation [Security] Fix `TraceableAuthenticator::createToken()` argument type Fix persian (fa) translation [Notifier][RocketChat] Fix undefined index for message id Add missing translation for Estonian Add validator missing french translation Add missing translation [Security][Validator] Add missing translations for Gallician (gl) Update validators.ar.xlf [Notifier] Fix 'Undefined array key' error in FirebaseTransport bug #43038 [Validator] Fixes URL validation for single-char subdomains.
Symfony version(s) affected: 4.4.30
Description
The UrlValidator is failing when the url contains multiple subdomains, and when one of the subdomains is a one-char subdomain. Example: "http://subdom1.subdom2.r.suddom3.domain.tld"
The "r" subdomain here makes the validator fail.
Please note that it only happens when the one-char subdomain is positioned between other subdomains.
How to reproduce
Possible Solution
Review the regex modified 2 weeks ago to allow one-char subdomain.
Additional context
I could see the regex validator was modified around 2 weeks ago, that introduced this failure.
Here is the commit: 074539d
The text was updated successfully, but these errors were encountered: