Log Message
Skip tabs and newlines between end of query and beginning of fragment in non-UTF-8-encoded URLs https://bugs.webkit.org/show_bug.cgi?id=163071
Reviewed by Tim Horton. Source/WebCore: Covered by a new API test that would have asserted before this change. * platform/URLParser.cpp: (WebCore::URLParser::encodeQuery): Skip tabs and newlines before asserting that we are at the end. Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::TEST_F):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (206878 => 206879)
--- trunk/Source/WebCore/ChangeLog 2016-10-06 20:46:04 UTC (rev 206878)
+++ trunk/Source/WebCore/ChangeLog 2016-10-06 20:47:44 UTC (rev 206879)
@@ -1,5 +1,18 @@
2016-10-06 Alex Christensen <achristen...@webkit.org>
+ Skip tabs and newlines between end of query and beginning of fragment in non-UTF-8-encoded URLs
+ https://bugs.webkit.org/show_bug.cgi?id=163071
+
+ Reviewed by Tim Horton.
+
+ Covered by a new API test that would have asserted before this change.
+
+ * platform/URLParser.cpp:
+ (WebCore::URLParser::encodeQuery):
+ Skip tabs and newlines before asserting that we are at the end.
+
+2016-10-06 Alex Christensen <achristen...@webkit.org>
+
URLParser should parse file URLs with ports consistently
https://bugs.webkit.org/show_bug.cgi?id=163075
Modified: trunk/Source/WebCore/platform/URLParser.cpp (206878 => 206879)
--- trunk/Source/WebCore/platform/URLParser.cpp 2016-10-06 20:46:04 UTC (rev 206878)
+++ trunk/Source/WebCore/platform/URLParser.cpp 2016-10-06 20:47:44 UTC (rev 206879)
@@ -604,6 +604,8 @@
appendToASCIIBuffer(byte);
++iterator;
}
+ while (!iterator.atEnd() && isTabOrNewline(*iterator))
+ ++iterator;
ASSERT((i == length) == iterator.atEnd());
for (; i < length; ++i) {
ASSERT(m_didSeeSyntaxViolation);
Modified: trunk/Tools/ChangeLog (206878 => 206879)
--- trunk/Tools/ChangeLog 2016-10-06 20:46:04 UTC (rev 206878)
+++ trunk/Tools/ChangeLog 2016-10-06 20:47:44 UTC (rev 206879)
@@ -1,5 +1,15 @@
2016-10-06 Alex Christensen <achristen...@webkit.org>
+ Skip tabs and newlines between end of query and beginning of fragment in non-UTF-8-encoded URLs
+ https://bugs.webkit.org/show_bug.cgi?id=163071
+
+ Reviewed by Tim Horton.
+
+ * TestWebKitAPI/Tests/WebCore/URLParser.cpp:
+ (TestWebKitAPI::TEST_F):
+
+2016-10-06 Alex Christensen <achristen...@webkit.org>
+
URLParser should parse file URLs with ports consistently
https://bugs.webkit.org/show_bug.cgi?id=163075
Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp (206878 => 206879)
--- trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp 2016-10-06 20:46:04 UTC (rev 206878)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp 2016-10-06 20:47:44 UTC (rev 206879)
@@ -1194,6 +1194,7 @@
checkURL("http://host/?\tquery", latin1, {"http", "", "", "host", 0, "/", "query", "", "http://host/?query"});
checkURL("http://host/?q\tuery", latin1, {"http", "", "", "host", 0, "/", "query", "", "http://host/?query"});
checkURL("http://host/?query with SpAcEs#fragment", latin1, {"http", "", "", "host", 0, "/", "query%20with%20SpAcEs", "fragment", "http://host/?query%20with%20SpAcEs#fragment"});
+ checkURL("http://host/?que\rry\t\r\n#fragment", latin1, {"http", "", "", "host", 0, "/", "query", "fragment", "http://host/?query#fragment"});
TextEncoding unrecognized(String("unrecognized invalid encoding name"));
checkURL("http://host/?query", unrecognized, {"http", "", "", "host", 0, "/", "", "", "http://host/?"});
_______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes