Changeset 211107 in webkit
- Timestamp:
- Jan 24, 2017, 1:23:05 PM (10 years ago)
- Location:
- branches/safari-603-branch
- Files:
-
- 4 edited
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/platform/URLParser.cpp (modified) (2 diffs)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-603-branch/Source/WebCore/ChangeLog
r211105 r211107 1 2017-01-24 Matthew Hanson <matthew_hanson@apple.com> 2 3 Merge r211067. rdar://problem/29319962 4 5 2017-01-23 Alex Christensen <achristensen@webkit.org> 6 7 URLParser should fail to parse percent-encoded invalid UTF-8 sequences 8 https://bugs.webkit.org/show_bug.cgi?id=167330 9 <rdar://problem/29319962> 10 11 Reviewed by Tim Horton. 12 13 Covered by new API tests. 14 15 * platform/URLParser.cpp: 16 (WebCore::containsOnlyASCII): 17 (WebCore::URLParser::parseHostAndPort): 18 If UTF-8 decoding fails after percent-decoding the host, fail to parse. 19 This matches Chrome and Firefox, and it was proposed to the spec in https://github.com/whatwg/url/issues/215 20 1 21 2017-01-24 Matthew Hanson <matthew_hanson@apple.com> 2 22 -
branches/safari-603-branch/Source/WebCore/platform/URLParser.cpp
r211105 r211107 2454 2454 ALWAYS_INLINE static bool containsOnlyASCII(const String& string) 2455 2455 { 2456 ASSERT(!string.isNull()); 2456 2457 if (string.is8Bit()) 2457 2458 return charactersAreAllASCII(string.characters8(), string.length()); … … 2671 2672 Vector<LChar, defaultInlineBufferSize> percentDecoded = percentDecode(utf8Encoded.data(), utf8Encoded.size(), hostBegin); 2672 2673 String domain = String::fromUTF8(percentDecoded.data(), percentDecoded.size()); 2674 if (domain.isNull()) 2675 return false; 2673 2676 if (domain != StringView(percentDecoded.data(), percentDecoded.size())) 2674 2677 syntaxViolation(hostBegin); -
branches/safari-603-branch/Tools/ChangeLog
r211105 r211107 1 2017-01-24 Matthew Hanson <matthew_hanson@apple.com> 2 3 Merge r211067. rdar://problem/29319962 4 5 2017-01-23 Alex Christensen <achristensen@webkit.org> 6 7 URLParser should fail to parse percent-encoded invalid UTF-8 sequences 8 https://bugs.webkit.org/show_bug.cgi?id=167330 9 10 Reviewed by Tim Horton. 11 12 * TestWebKitAPI/Tests/WebCore/URLParser.cpp: 13 (TestWebKitAPI::TEST_F): 14 1 15 2017-01-24 Matthew Hanson <matthew_hanson@apple.com> 2 16 -
branches/safari-603-branch/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp
r211105 r211107 788 788 {"file", "", "", "", 0, "/pAtH/", "", "", "file:///pAtH/"}, 789 789 {"file", "", "", "", 0, "pAtH/", "", "", "file://pAtH/"}); 790 790 checkURLDifferences("http://example.com%A0", 791 {"", "", "", "", 0, "", "", "", "http://example.com%A0"}, 792 {"http", "", "", "example.com%a0", 0, "/", "", "", "http://example.com%a0/"}); 793 checkURLDifferences("http://%E2%98%83", 794 {"http", "", "", "xn--n3h", 0, "/", "", "", "http://xn--n3h/"}, 795 {"http", "", "", "%e2%98%83", 0, "/", "", "", "http://%e2%98%83/"}); 791 796 checkURLDifferences("http://host%73", 792 797 {"http", "", "", "hosts", 0, "/", "", "", "http://hosts/"},
Note:
See TracChangeset
for help on using the changeset viewer.