File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 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
3535 \] # an IPv6 address
3636 )
3737 (:[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)
4141 $~ixu ' ;
4242
4343 /**
Original file line number Diff line number Diff line change @@ -151,6 +151,7 @@ public function getValidUrls()
151151 ['http://symfony.com#fragment ' ],
152152 ['http://symfony.com/#fragment ' ],
153153 ['http://symfony.com/#one_more%20test ' ],
154+ ['http://example.com/exploit.html?hello[0]=test ' ],
154155 ];
155156 }
156157
You can’t perform that action at this time.
0 commit comments