File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class UrlValidator extends ConstraintValidator
2323{
2424 const PATTERN = '~^
2525 (%s):// # protocol
26- (([\.\pL\pN-]+:)?([\.\pL\pN-]+)@)? # basic auth
26+ (([\_\ .\pL\pN-]+:)?([\_\ .\pL\pN-]+)@)? # basic auth
2727 (
2828 ([\pL\pN\pS\-\_\.])+(\.?([\pL\pN]|xn\-\-[\pL\pN-]+)+\.?) # a domain name
2929 | # or
Original file line number Diff line number Diff line change @@ -117,9 +117,11 @@ public function getValidUrls()
117117 ['http://☎.com/ ' ],
118118 ['http://username:password@symfony.com ' ],
119119 ['http://user.name:password@symfony.com ' ],
120+ ['http://user_name:pass_word@symfony.com ' ],
120121 ['http://username:pass.word@symfony.com ' ],
121122 ['http://user.name:pass.word@symfony.com ' ],
122123 ['http://user-name@symfony.com ' ],
124+ ['http://user_name@symfony.com ' ],
123125 ['http://symfony.com? ' ],
124126 ['http://symfony.com?query=1 ' ],
125127 ['http://symfony.com/?query=1 ' ],
You can’t perform that action at this time.
0 commit comments