10000 reject URLs with URL-encoded non UTF-8 characters in the host part · symfony/symfony@8f8f940 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8f8f940

Browse files
committed
reject URLs with URL-encoded non UTF-8 characters in the host part
1 parent 6069cd9 commit 8f8f940

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/HtmlSanitizer/Tests/TextSanitizer/UrlSanitizerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -568,8 +568,8 @@ public static function provideParse(): iterable
568568
'http://你好你好' => ['scheme' => 'http', 'host' => '你好你好'],
569569
'https://faß.ExAmPlE/' => ['scheme' => 'https', 'host' => 'faß.ExAmPlE'],
570570
'sc://faß.ExAmPlE/' => ['scheme' => 'sc', 'host' => 'faß.ExAmPlE'],
571-
'http://%30%78%63%30%2e%30%32%35%30.01' => ['scheme' => 'http', 'host' => '%30%78%63%30%2e%30%32%35%30.01'],
572-
'http://%30%78%63%30%2e%30%32%35%30.01%2e' => ['scheme' => 'http', 'host' => '%30%78%63%30%2e%30%32%35%30.01%2e'],
571+
'http://%30%78%63%30%2e%30%32%35%30.01' => null,
572+
'http://%30%78%63%30%2e%30%32%35%30.01%2e' => null,
573573
'http://0Xc0.0250.01' => ['scheme' => 'http', 'host' => '0Xc0.0250.01'],
574574
'http://./' => ['scheme' => 'http', 'host' => '.'],
575575
'http://../' => ['scheme' => 'http', 'host' => '..'],
@@ -689,7 +689,7 @@ public static function provideParse(): iterable
689689
'urn:ietf:rfc:2648' => ['scheme' => 'urn', 'host' => null],
690690
'tag:joe@example.org,2001:foo/bar' => ['scheme' => 'tag', 'host' => null],
691691
'non-special://%E2%80%A0/' => ['scheme' => 'non-special', 'host' => '%E2%80%A0'],
692-
'non-special://H%4fSt/path' => ['scheme' => 'non-special', 'host' => 'H%4fSt'],
692+
'non-special://H%4fSt/path' => null,
693693
'non-special://[1:2:0:0:5:0:0:0]/' => ['scheme' => 'non-special', 'host' => '[1:2:0:0:5:0:0:0]'],
694694
'non-special://[1:2:0:0:0:0:0:3]/' => ['scheme' => 'non-special', 'host' => '[1:2:0:0:0:0:0:3]'],
695695
'non-special://[1:2::3]:80/' => ['scheme' => 'non-special', 'host' => '[1:2::3]'],

0 commit comments

Comments
 (0)
0