Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Validator] Fix validation for single level domains#43876
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas commentedNov 2, 2021
This looks strange to me because this means that |
welcoMattic commentedNov 19, 2021
@nicolas-grekas wasn't this case fixed by#44119? |
nicolas-grekas commentedNov 19, 2021
#44119 is on HttpClient+Mime, this one is on Validator, so I'm not sure. |
welcoMattic commentedNov 19, 2021
Yes you are right, at the Validator level maybe we don't have to worry about the |
HypeMC commentedNov 19, 2021
@nicolas-grekas Sorry, I missed your earlier comment, will check it out later today. |
nicolas-grekas commentedNov 24, 2021
Looks like#44252 could provide us with another test case, can you please incorporate it here also? |
Uh oh!
There was an error while loading.Please reload this page.
829372b to6dc7c87CompareHypeMC commentedNov 29, 2021
I've split the domain part into two cases:
Of course, this won't work if you have a multi-level internal domain, eg |
6dc7c87 to4d3c016Compare
nicolas-grekas left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I've update the regexp to not allow unicode chars in local domain names
I've also split it to deal with punycode separately from unicode global domain names,
and ensured thathttp://বিডিআইএ.বাংলা is accepted (adding\pM to the regexp) for unicode global domain names, since this host exists.
8b29f2c to5cbd90eCompare5cbd90e to653a21dComparenicolas-grekas commentedNov 29, 2021
Thank you@HypeMC. |
Uh oh!
There was an error while loading.Please reload this page.
Not sure if there are any other test cases that could be added, but this seems to fix the problem.