File tree 2 files changed +4
-3
lines changed
src/Symfony/Component/Validator
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,9 @@ class UrlValidator extends ConstraintValidator
35
35
\] # an IPv6 address
36
36
)
37
37
(:[0-9]+)? # a port (optional)
38
- (?:/ (?:[\pL\pN\-._\~!$& \'()*+,;=:@]|%%[0-9A-Fa-f]{2})* )* # a path
39
- (?:\? (?:[\pL\pN\-._\~!$& \'()*+,;=:@/?]|%%[0-9A-Fa-f]{2})* )? # a query (optional)
40
- (?:\# (?:[\pL\pN\-._\~!$& \'()*+,;=:@/?]|%%[0-9A-Fa-f]{2})* )? # a fragment (optional)
38
+ (?:/ (?:[\pL\pN\-._\~!$& \'()*+,;=:@]|%%[0-9A-Fa-f]{2})* )* # a path
39
+ (?:\? (?:[\pL\pN\-._\~!$& \'\[\] ()*+,;=:@/?]|%%[0-9A-Fa-f]{2})* )? # a query (optional)
40
+ (?:\# (?:[\pL\pN\-._\~!$& \'()*+,;=:@/?]|%%[0-9A-Fa-f]{2})* )? # a fragment (optional)
41
41
$~ixu ' ;
42
42
43
43
/**
Original file line number Diff line number Diff line change @@ -151,6 +151,7 @@ public function getValidUrls()
151
151
['http://symfony.com#fragment ' ],
152
152
['http://symfony.com/#fragment ' ],
153
153
['http://symfony.com/#one_more%20test ' ],
154
+ ['http://example.com/exploit.html?hello[0]=test ' ],
154
155
];
155
156
}
156
157
You can’t perform that action at this time.
0 commit comments