WebKit Bugzilla
Attachment 373738 Details for
Bug 199628
: When parsing an IPv4 address, wait until after deciding it is indeed an IPv4 address before reporting syntax violations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199628-20190709115508.patch (text/plain), 3.43 KB, created by
Alex Christensen
on 2019-07-09 11:55:09 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2019-07-09 11:55:09 PDT
Size:
3.43 KB
patch
obsolete
>Subversion Revision: 247246 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 911926796b3dba72ab8273a51f46579fef522bf3..a7c4368eb6a04aff7da816e2152c8909a8911321 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,16 @@ >+2019-07-09 Alex Christensen <achristensen@webkit.org> >+ >+ When parsing an IPv4 address, wait until after deciding it is indeed an IPv4 address before reporting syntax violations >+ https://bugs.webkit.org/show_bug.cgi?id=199628 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Otherwise, we sometimes report syntax violations on things that are not IPv4 addresses and don't have syntax violations. >+ I added a unit test with one such URL that used to cause an assertion. >+ >+ * wtf/URLParser.cpp: >+ (WTF::URLParser::parseIPv4Host): >+ > 2019-07-08 Chris Dumez <cdumez@apple.com> > > Use WeakHashSet for WebUserContentControllerProxy::m_processes >diff --git a/Source/WTF/wtf/URLParser.cpp b/Source/WTF/wtf/URLParser.cpp >index cdfc0f82160d5d7985f5d01d19b2449b1d050c73..3ce3cb68a337356f0bc28be2147da6e46295762e 100644 >--- a/Source/WTF/wtf/URLParser.cpp >+++ b/Source/WTF/wtf/URLParser.cpp >@@ -2294,7 +2294,7 @@ Expected<URLParser::IPv4Address, URLParser::IPv4ParsingError> URLParser::parseIP > if (!iterator.atEnd() && *iterator == '.') { > ++iterator; > if (iterator.atEnd()) >- syntaxViolation(iteratorForSyntaxViolationPosition); >+ didSeeSyntaxViolation = true; > else if (*iterator == '.') > return makeUnexpected(IPv4ParsingError::NotIPv4); > } >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index d09b05553bf7e20a71aae9d86a5d74ff1fa63d15..c19abde0f54eab503b288a0cf928f0e7b1d0afdb 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,13 @@ >+2019-07-09 Alex Christensen <achristensen@webkit.org> >+ >+ When parsing an IPv4 address, wait until after deciding it is indeed an IPv4 address before reporting syntax violations >+ https://bugs.webkit.org/show_bug.cgi?id=199628 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * TestWebKitAPI/Tests/WTF/URLParser.cpp: >+ (TestWebKitAPI::TEST_F): >+ > 2019-07-08 Fujii Hironori <Hironori.Fujii@sony.com> > > JSTestGlobalObject.cpp of bindings-generation-tests is failing for Windows Python >diff --git a/Tools/TestWebKitAPI/Tests/WTF/URLParser.cpp b/Tools/TestWebKitAPI/Tests/WTF/URLParser.cpp >index cbd3f1f449a8635230bb9981b84e1b8e6a8d78ff..21f5217823cb686c9a20225b1418fc26022a005e 100644 >--- a/Tools/TestWebKitAPI/Tests/WTF/URLParser.cpp >+++ b/Tools/TestWebKitAPI/Tests/WTF/URLParser.cpp >@@ -345,6 +345,7 @@ TEST_F(WTF_URLParser, Basic) > checkURL("http://127.0.0.1:/\tpath", {"http", "", "", "127.0.0.1", 0, "/path", "", "", "http://127.0.0.1/path"}); > checkURL("http://127.0.0.1:123", {"http", "", "", "127.0.0.1", 123, "/", "", "", "http://127.0.0.1:123/"}); > checkURL("http://127.0.0.1:", {"http", "", "", "127.0.0.1", 0, "/", "", "", "http://127.0.0.1/"}); >+ checkURL("ws://08./", {"ws", "", "", "08.", 0, "/", "", "", "ws://08./"}); > checkURL("http://[0:f::f:f:0:0]:123/path", {"http", "", "", "[0:f::f:f:0:0]", 123, "/path", "", "", "http://[0:f::f:f:0:0]:123/path"}); > checkURL("http://[0:f::f:f:0:0]:123", {"http", "", "", "[0:f::f:f:0:0]", 123, "/", "", "", "http://[0:f::f:f:0:0]:123/"}); > checkURL("http://[0:f:0:0:f:\t:]:123", {"http", "", "", "[0:f:0:0:f::]", 123, "/", "", "", "http://[0:f:0:0:f::]:123/"});
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:
beidson
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199628
: 373738