RESOLVED FIXED 190005
URLs with mismatched surrogate pairs in the host should fail to parse
https://bugs.webkit.org/show_bug.cgi?id=190005
Summary URLs with mismatched surrogate pairs in the host should fail to parse
Alex Christensen
Reported 2018-09-26 12:01:51 PDT
URLs with mismatched surrogate pairs in the host should fail to parse
Attachments
Patch (3.75 KB, patch)
2018-09-26 12:04 PDT, Alex Christensen
cdumez: review+
Alex Christensen
Comment 1 2018-09-26 12:04:26 PDT
Alex Christensen
Comment 2 2018-09-26 14:58:48 PDT
Radar WebKit Bug Importer
Comment 3 2018-09-26 14:59:27 PDT
Alexey Proskuryakov
Comment 4 2018-09-28 12:55:46 PDT
Comment on attachment 350879 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=350879&action=review > Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp:1260 > + const wchar_t replacementCharacter = 0xFFFD; Can this be verified with a web facing test? API tests are a lot more costly in many ways (poor infrastructure to maintain, no EWS support, no parallelization).
Darin Adler
Comment 5 2018-09-30 20:15:13 PDT
Comment on attachment 350879 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=350879&action=review > Source/WebCore/platform/URLParser.cpp:2758 > + if (!U_IS_UNICODE_CHAR(*iterator)) This line of code does not simply check for mismatched surrogates. If we only wanted to do that, the correct code would be: if (U_IS_SURROGATE(*iterator)) The U_IS_UNICODE_CHAR function excludes surrogates, but also excludes FDD0-FDEF, FFFE, and FFFF. Do we want that behavior? The added test doesn't cover this, but it should cover those cases too if we think the behavior change is helpful.
Note You need to log in before you can comment on or make changes to this bug.