Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Validator] UrlValidator does not accept path with some unicode #54937

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

Closed
norkunas opened this issue May 16, 2024 · 1 comment
Closed

[Validator] UrlValidator does not accept path with some unicode #54937

norkunas opened this issue May 16, 2024 · 1 comment

Comments

@norkunas
Copy link
Contributor

norkunas commented May 16, 2024

Symfony version(s) affected

>= 5.4.*

Description

I've automated import resources from an api which returned an url http://www.fivestarproduction.co.th/คนแซ่ลี้/ and the validation fails with it.

Works only when the path for this URL is urlencoded.

But if the link is working directly, it should be accepted by validator, no?

Copied random japanase symbol from alphabet and for example this url works: http://www.example.com/か/

How to reproduce

preg_match(sprintf(UrlValidator::PATTERN, 'http|https'), 'http://www.fivestarproduction.co.th/คนแซ่ลี้/') === 0

Possible Solution

No response

Additional Context

No response

@xabbuh
Copy link
Member

xabbuh commented Aug 2, 2024

#57905 should fix this

@fabpot fabpot closed this as completed Aug 3, 2024
fabpot added a commit that referenced this issue Aug 3, 2024
…bbuh)

This PR was merged into the 5.4 branch.

Discussion
----------

[Validator] allow more unicode characters in URL paths

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | Fix #54937
| License       | MIT

Commits
-------

eba88f8 allow more unicode characters in URL paths
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants