WebKit Bugzilla
Attachment 371072 Details for
Bug 198428
: URLParser::parseHostAndPort should not allow non-port characters after an ipv6 host
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198428-20190531113102.patch (text/plain), 2.90 KB, created by
Alex Christensen
on 2019-05-31 11:31:03 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2019-05-31 11:31:03 PDT
Size:
2.90 KB
patch
obsolete
>Index: Source/WTF/ChangeLog >=================================================================== >--- Source/WTF/ChangeLog (revision 245903) >+++ Source/WTF/ChangeLog (working copy) >@@ -1,3 +1,16 @@ >+2019-05-31 Alex Christensen <achristensen@webkit.org> >+ >+ URLParser::parseHostAndPort should not allow non-port characters after an ipv6 host >+ https://bugs.webkit.org/show_bug.cgi?id=198428 >+ <rdar://problem/51209196> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This matches Chrome and Firefox. >+ >+ * wtf/URLParser.cpp: >+ (WTF::URLParser::parseHostAndPort): >+ > 2019-04-30 Alan Coon <alancoon@apple.com> > > Cherry-pick r243641. rdar://problem/50232877 >Index: Source/WTF/wtf/URLParser.cpp >=================================================================== >--- Source/WTF/wtf/URLParser.cpp (revision 245903) >+++ Source/WTF/wtf/URLParser.cpp (working copy) >@@ -2657,13 +2657,11 @@ bool URLParser::parseHostAndPort(CodePoi > serializeIPv6(address.value()); > if (!ipv6End.atEnd()) { > advance(ipv6End); >- if (!ipv6End.atEnd() && *ipv6End == ':') { >- m_url.m_hostEnd = currentPosition(ipv6End); >- return parsePort(ipv6End); >- } > m_url.m_hostEnd = currentPosition(ipv6End); >+ if (!ipv6End.atEnd() && *ipv6End == ':') >+ return parsePort(ipv6End); > m_url.m_portLength = 0; >- return true; >+ return ipv6End.atEnd(); > } > m_url.m_hostEnd = currentPosition(ipv6End); > return true; >Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 245973) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,14 @@ >+2019-05-31 Alex Christensen <achristensen@webkit.org> >+ >+ URLParser::parseHostAndPort should not allow non-port characters after an ipv6 host >+ https://bugs.webkit.org/show_bug.cgi?id=198428 >+ <rdar://problem/51209196> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * TestWebKitAPI/Tests/WTF/URLParser.cpp: >+ (TestWebKitAPI::TEST_F): >+ > 2019-05-30 Kocsen Chung <kocsen_chung@apple.com> > > Apply patch. rdar://problem/50753927 >Index: Tools/TestWebKitAPI/Tests/WTF/URLParser.cpp >=================================================================== >--- Tools/TestWebKitAPI/Tests/WTF/URLParser.cpp (revision 245903) >+++ Tools/TestWebKitAPI/Tests/WTF/URLParser.cpp (working copy) >@@ -1211,6 +1211,9 @@ TEST_F(WTF_URLParser, ParserFailures) > shouldFail("://:0/", "about:blank"); > shouldFail("about~"); > shouldFail("//C:asdf/foo/bar", "file:///tmp/mock/path"); >+ shouldFail("wss://[c::]abc/"); >+ shouldFail("abc://[c::]:abc/"); >+ shouldFail("abc://[c::]01"); > shouldFail("http://[1234::ab#]"); > shouldFail("http://[1234::ab/]"); > shouldFail("http://[1234::ab?]");
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
thorton
:
review+
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198428
: 371072