Log Message
URLParser: IPv6 addresses followed by a colon are invalid https://bugs.webkit.org/show_bug.cgi?id=162747
Reviewed by Tim Horton. Source/WebCore: Covered by new API tests. * platform/URLParser.cpp: (WebCore::URLParser::parseIPv6Host): Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::TEST_F):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (206607 => 206608)
--- trunk/Source/WebCore/ChangeLog 2016-09-29 20:03:11 UTC (rev 206607)
+++ trunk/Source/WebCore/ChangeLog 2016-09-29 20:18:16 UTC (rev 206608)
@@ -1,3 +1,15 @@
+2016-09-29 Alex Christensen <achristen...@webkit.org>
+
+ URLParser: IPv6 addresses followed by a colon are invalid
+ https://bugs.webkit.org/show_bug.cgi?id=162747
+
+ Reviewed by Tim Horton.
+
+ Covered by new API tests.
+
+ * platform/URLParser.cpp:
+ (WebCore::URLParser::parseIPv6Host):
+
2016-09-29 Antoine Quint <grao...@apple.com>
[Modern Media Controls] scheduler for layout nodes
Modified: trunk/Source/WebCore/platform/URLParser.cpp (206607 => 206608)
--- trunk/Source/WebCore/platform/URLParser.cpp 2016-09-29 20:03:11 UTC (rev 206607)
+++ trunk/Source/WebCore/platform/URLParser.cpp 2016-09-29 20:18:16 UTC (rev 206608)
@@ -2201,7 +2201,7 @@
address[piecePointer++] = value;
if (c.atEnd())
break;
- if (*c != ':')
+ if (piecePointer == 8 || *c != ':')
return Nullopt;
advance(c, hostBegin);
}
Modified: trunk/Tools/ChangeLog (206607 => 206608)
--- trunk/Tools/ChangeLog 2016-09-29 20:03:11 UTC (rev 206607)
+++ trunk/Tools/ChangeLog 2016-09-29 20:18:16 UTC (rev 206608)
@@ -1,3 +1,13 @@
+2016-09-29 Alex Christensen <achristen...@webkit.org>
+
+ URLParser: IPv6 addresses followed by a colon are invalid
+ https://bugs.webkit.org/show_bug.cgi?id=162747
+
+ Reviewed by Tim Horton.
+
+ * TestWebKitAPI/Tests/WebCore/URLParser.cpp:
+ (TestWebKitAPI::TEST_F):
+
2016-09-29 Alexey Proskuryakov <a...@apple.com>
Make WKTR short timeout dynamic
Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp (206607 => 206608)
--- trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp 2016-09-29 20:03:11 UTC (rev 206607)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp 2016-09-29 20:18:16 UTC (rev 206608)
@@ -736,6 +736,18 @@
checkURLDifferences("http://127.%.0.1/",
{"", "", "", "", 0, "", "", "", "http://127.%.0.1/"},
{"http", "", "", "127.%.0.1", 0, "/", "", "", "http://127.%.0.1/"});
+ checkURLDifferences("http://[1:2:3:4:5:6:7:8:]/",
+ {"", "", "", "", 0, "", "", "", "http://[1:2:3:4:5:6:7:8:]/"},
+ {"http", "", "", "[1:2:3:4:5:6:7:8:]", 0, "/", "", "", "http://[1:2:3:4:5:6:7:8:]/"});
+ checkURLDifferences("http://[:2:3:4:5:6:7:8:]/",
+ {"", "", "", "", 0, "", "", "", "http://[:2:3:4:5:6:7:8:]/"},
+ {"http", "", "", "[:2:3:4:5:6:7:8:]", 0, "/", "", "", "http://[:2:3:4:5:6:7:8:]/"});
+ checkURLDifferences("http://[1:2:3:4:5:6:7::]/",
+ {"http", "", "", "[1:2:3:4:5:6:7:0]", 0, "/", "", "", "http://[1:2:3:4:5:6:7:0]/"},
+ {"http", "", "", "[1:2:3:4:5:6:7::]", 0, "/", "", "", "http://[1:2:3:4:5:6:7::]/"});
+ checkURLDifferences("http://[1:2:3:4:5:6:7:::]/",
+ {"", "", "", "", 0, "", "", "", "http://[1:2:3:4:5:6:7:::]/"},
+ {"http", "", "", "[1:2:3:4:5:6:7:::]", 0, "/", "", "", "http://[1:2:3:4:5:6:7:::]/"});
}
TEST_F(URLParserTest, DefaultPort)
@@ -882,6 +894,7 @@
shouldFail("http://[1234::ab@]");
shouldFail("http://[1234::ab~]");
shouldFail("http://[2001::1");
+ shouldFail("http://[1:2:3:4:5:6:7:8~]/");
}
// These are in the spec but not in the web platform tests.
_______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes