WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 162836
URLParser should ignore tabs at all locations
https://bugs.webkit.org/show_bug.cgi?id=162836
Summary
URLParser should ignore tabs at all locations
Alex Christensen
Reported
2016-09-30 20:23:31 PDT
URLParser should ignore tabs at all locations
Attachments
Patch
(15.89 KB, patch)
2016-09-30 20:25 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2016-09-30 20:25:42 PDT
Created
attachment 290421
[details]
Patch
Alex Christensen
Comment 2
2016-10-03 14:31:07 PDT
Comment on
attachment 290421
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=290421&action=review
Geoff said "r=me"
> Source/WebCore/ChangeLog:3 > + URLParser should ignore tabs at all locations
s/ignore/strip/
> Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp:72 > +enum class CheckTabs { No, Yes };
enum class TestTabs?
> Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp:73 > +const CheckTabs containsEncodedSurrogatePairs = CheckTabs::No;
Maybe "checkTabsValueForSurrogatePairs"? And then a comment here that says we can't auto-insert tabs because they would ruin the encoding.
> Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp:455 > + if (checkTabs == CheckTabs::Yes) { > + for (size_t i = 0; i < urlString.length(); ++i) { > + String urlStringWithTab = makeString(urlString.substring(0, i), "\t", urlString.substring(i)); > + ExpectedParts invalidPartsWithTab = {"", "", "", "", 0, "" , "", "", urlStringWithTab}; > + checkURLDifferences(urlStringWithTab, partsNew.isInvalid() ? invalidPartsWithTab : partsNew, partsOld.isInvalid() ? invalidPartsWithTab : partsOld, CheckTabs::No); > + } > + }
Maybe some helper function action for tab checking?
Alex Christensen
Comment 3
2016-10-03 15:41:42 PDT
I'm also going to remove the incorrect tests for "
http://123\t.256/
" and "
http://123.\t256/
" canonicalizing to "
http://123.256/
". Those tests were verifying incorrect behavior that this patch fixed. There is already a test that canonicalizes it correctly to "
http://123.0.1.0/
" in the new URLParser.
Alex Christensen
Comment 4
2016-10-03 15:58:27 PDT
http://trac.webkit.org/changeset/206758
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug