Log Message
URLParser should ignore tabs in authority https://bugs.webkit.org/show_bug.cgi?id=162694
Reviewed by Geoffrey Garen. Source/WebCore: Covered by new API tests. * platform/URLParser.cpp: (WebCore::URLParser::parseAuthority): Tools: * TestWebKitAPI/Tests/WebCore/URLParser.cpp: (TestWebKitAPI::TEST_F):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (206548 => 206549)
--- trunk/Source/WebCore/ChangeLog 2016-09-28 21:14:44 UTC (rev 206548)
+++ trunk/Source/WebCore/ChangeLog 2016-09-28 21:16:22 UTC (rev 206549)
@@ -1,5 +1,17 @@
2016-09-28 Alex Christensen <[email protected]>
+ URLParser should ignore tabs in authority
+ https://bugs.webkit.org/show_bug.cgi?id=162694
+
+ Reviewed by Geoffrey Garen.
+
+ Covered by new API tests.
+
+ * platform/URLParser.cpp:
+ (WebCore::URLParser::parseAuthority):
+
+2016-09-28 Alex Christensen <[email protected]>
+
URLParser should ignore extra slashes after scheme:// and handle a missing slash after the port
https://bugs.webkit.org/show_bug.cgi?id=162690
Modified: trunk/Source/WebCore/platform/URLParser.cpp (206548 => 206549)
--- trunk/Source/WebCore/platform/URLParser.cpp 2016-09-28 21:14:44 UTC (rev 206548)
+++ trunk/Source/WebCore/platform/URLParser.cpp 2016-09-28 21:16:22 UTC (rev 206549)
@@ -1847,12 +1847,16 @@
m_url.m_passwordEnd = m_url.m_userEnd;
return;
}
- auto authorityOrHostBegin = iterator;
for (; !iterator.atEnd(); advance(iterator)) {
if (*iterator == ':') {
m_url.m_userEnd = currentPosition(iterator);
auto iteratorAtColon = iterator;
- advance(iterator, authorityOrHostBegin);
+ ++iterator;
+ bool tabOrNewlineAfterColon = false;
+ while (UNLIKELY(!iterator.atEnd() && isTabOrNewline(*iterator))) {
+ tabOrNewlineAfterColon = true;
+ ++iterator;
+ }
if (UNLIKELY(iterator.atEnd())) {
syntaxViolation(iteratorAtColon);
m_url.m_passwordEnd = m_url.m_userEnd;
@@ -1860,6 +1864,8 @@
appendToASCIIBuffer('@');
return;
}
+ if (tabOrNewlineAfterColon)
+ syntaxViolation(iteratorAtColon);
appendToASCIIBuffer(':');
break;
}
Modified: trunk/Tools/ChangeLog (206548 => 206549)
--- trunk/Tools/ChangeLog 2016-09-28 21:14:44 UTC (rev 206548)
+++ trunk/Tools/ChangeLog 2016-09-28 21:16:22 UTC (rev 206549)
@@ -1,5 +1,15 @@
2016-09-28 Alex Christensen <[email protected]>
+ URLParser should ignore tabs in authority
+ https://bugs.webkit.org/show_bug.cgi?id=162694
+
+ Reviewed by Geoffrey Garen.
+
+ * TestWebKitAPI/Tests/WebCore/URLParser.cpp:
+ (TestWebKitAPI::TEST_F):
+
+2016-09-28 Alex Christensen <[email protected]>
+
URLParser should ignore extra slashes after scheme:// and handle a missing slash after the port
https://bugs.webkit.org/show_bug.cgi?id=162690
Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp (206548 => 206549)
--- trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp 2016-09-28 21:14:44 UTC (rev 206548)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp 2016-09-28 21:16:22 UTC (rev 206549)
@@ -109,6 +109,12 @@
checkURL("http://user:[email protected]:123/", {"http", "user", "pass", "webkit.org", 123, "/", "", "", "http://user:[email protected]:123/"});
checkURL("http://user:[email protected]:123", {"http", "user", "pass", "webkit.org", 123, "/", "", "", "http://user:[email protected]:123/"});
checkURL("http://user:[email protected]", {"http", "user", "pass", "webkit.org", 0, "/", "", "", "http://user:[email protected]/"});
+ checkURL("http://user:\t\t\[email protected]", {"http", "user", "pass", "webkit.org", 0, "/", "", "", "http://user:[email protected]/"});
+ checkURL("http://us\ter:[email protected]", {"http", "user", "pass", "webkit.org", 0, "/", "", "", "http://user:[email protected]/"});
+ checkURL("http://user:pa\[email protected]", {"http", "user", "pass", "webkit.org", 0, "/", "", "", "http://user:[email protected]/"});
+ checkURL("http://user:pass\[email protected]", {"http", "user", "pass", "webkit.org", 0, "/", "", "", "http://user:[email protected]/"});
+ checkURL("http://\tuser:[email protected]", {"http", "user", "pass", "webkit.org", 0, "/", "", "", "http://user:[email protected]/"});
+ checkURL("http://user\t:[email protected]", {"http", "user", "pass", "webkit.org", 0, "/", "", "", "http://user:[email protected]/"});
checkURL("http://webkit.org", {"http", "", "", "webkit.org", 0, "/", "", "", "http://webkit.org/"});
checkURL("http://127.0.0.1", {"http", "", "", "127.0.0.1", 0, "/", "", "", "http://127.0.0.1/"});
checkURL("http://webkit.org/", {"http", "", "", "webkit.org", 0, "/", "", "", "http://webkit.org/"});
@@ -201,6 +207,7 @@
checkURL("http://host?q=@ <>!#fragment", {"http", "", "", "host", 0, "/", "q=@%20%3C%3E!", "fragment", "http://host/?q=@%20%3C%3E!#fragment"});
checkURL("http://user:@host", {"http", "user", "", "host", 0, "/", "", "", "http://user@host/"});
checkURL("http://user:@\thost", {"http", "user", "", "host", 0, "/", "", "", "http://user@host/"});
+ checkURL("http://user:\t@host", {"http", "user", "", "host", 0, "/", "", "", "http://user@host/"});
checkURL("http://user\t:@host", {"http", "user", "", "host", 0, "/", "", "", "http://user@host/"});
checkURL("http://use\tr:@host", {"http", "user", "", "host", 0, "/", "", "", "http://user@host/"});
checkURL("http://127.0.0.1:10100/path", {"http", "", "", "127.0.0.1", 10100, "/path", "", "", "http://127.0.0.1:10100/path"});
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
