WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
160913
URLParser should parse URLs without credentials
https://bugs.webkit.org/show_bug.cgi?id=160913
Summary
URLParser should parse URLs without credentials
Alex Christensen
Reported
2016-08-16 14:55:55 PDT
URLParser should parse URLs without credentials
Attachments
Patch
(20.51 KB, patch)
2016-08-16 15:03 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(21.00 KB, patch)
2016-08-16 17:09 PDT
,
Alex Christensen
beidson
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2016-08-16 15:03:11 PDT
Created
attachment 286209
[details]
Patch
Brady Eidson
Comment 2
2016-08-16 16:53:39 PDT
Comment on
attachment 286209
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=286209&action=review
> Source/WebCore/platform/URLParser.cpp:60 > + while (isC0ControlOrSpace(*c)) > ++c;
From a readability standpoint, this seems dangerous - Like you'd easily walk "c" off the end. Why is this okay?
> Source/WebCore/platform/URLParser.cpp:423 > + LOG(URLParser, "%d %d %d %d %d %d %d %d %d %d %d %d %s\n%d %d %d %d %d %d %d %d %d %d %d %d %s", > + a.m_isValid, a.m_protocolIsInHTTPFamily, a.m_schemeEnd, a.m_userStart, a.m_userEnd, a.m_passwordEnd, a.m_hostEnd, a.m_portEnd, a.m_pathAfterLastSlash, a.m_pathEnd, a.m_queryEnd, a.m_fragmentEnd, a.m_string.utf8().data(), > + b.m_isValid, b.m_protocolIsInHTTPFamily, b.m_schemeEnd, b.m_userStart, b.m_userEnd, b.m_passwordEnd, b.m_hostEnd, b.m_portEnd, b.m_pathAfterLastSlash, b.m_pathEnd, b.m_queryEnd, b.m_fragmentEnd, b.m_string.utf8().data()); > +
Debug-only code, I know. Makes me sad anyways.
Alex Christensen
Comment 3
2016-08-16 17:09:26 PDT
Created
attachment 286236
[details]
Patch
Alex Christensen
Comment 4
2016-08-16 17:10:27 PDT
(In reply to
comment #2
)
> Comment on
attachment 286209
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=286209&action=review
> > > Source/WebCore/platform/URLParser.cpp:60 > > + while (isC0ControlOrSpace(*c)) > > ++c; > > From a readability standpoint, this seems dangerous - Like you'd easily walk > "c" off the end. > > Why is this okay?
This is not ok, and even though I thought it was not in the scope of this patch, I fixed it and added a test.
> > > Source/WebCore/platform/URLParser.cpp:423 > > + LOG(URLParser, "%d %d %d %d %d %d %d %d %d %d %d %d %s\n%d %d %d %d %d %d %d %d %d %d %d %d %s", > > + a.m_isValid, a.m_protocolIsInHTTPFamily, a.m_schemeEnd, a.m_userStart, a.m_userEnd, a.m_passwordEnd, a.m_hostEnd, a.m_portEnd, a.m_pathAfterLastSlash, a.m_pathEnd, a.m_queryEnd, a.m_fragmentEnd, a.m_string.utf8().data(), > > + b.m_isValid, b.m_protocolIsInHTTPFamily, b.m_schemeEnd, b.m_userStart, b.m_userEnd, b.m_passwordEnd, b.m_hostEnd, b.m_portEnd, b.m_pathAfterLastSlash, b.m_pathEnd, b.m_queryEnd, b.m_fragmentEnd, b.m_string.utf8().data()); > > + > > Debug-only code, I know. Makes me sad anyways.
This makes me happy. I put them each on their own line, if that makes you happier.
Alex Christensen
Comment 5
2016-08-16 17:43:20 PDT
http://trac.webkit.org/changeset/204544
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