WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
37777
protocolHostAndPortEquals host check makes a wrong assumption
https://bugs.webkit.org/show_bug.cgi?id=37777
Summary
protocolHostAndPortEquals host check makes a wrong assumption
Julien Chaffraix
Reported
2010-04-18 15:01:09 PDT
The logic assumes that both the URL starts at the same position. This is right for most URL but is wrong for URL containing credentials: the code will return false for
http://foo.example.com
and
http://user:pass@foo.example.com
.
Attachments
Proposed fix: take URLs credential into account
(5.29 KB, patch)
2010-04-18 15:37 PDT
,
Julien Chaffraix
ap
: review+
jchaffraix
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Julien Chaffraix
Comment 1
2010-04-18 15:37:52 PDT
Created
attachment 53639
[details]
Proposed fix: take URLs credential into account
Alexey Proskuryakov
Comment 2
2010-04-19 23:13:33 PDT
Comment on
attachment 53639
[details]
Proposed fix: take URLs credential into account + int lengthHostA = a.hostEnd() - hostStartA; It's strange that the order of words is different in old and new variables, "host start" vs. "length host". r=me, good catch!
Julien Chaffraix
Comment 3
2010-04-24 09:47:18 PDT
(In reply to
comment #2
)
> (From update of
attachment 53639
[details]
) > + int lengthHostA = a.hostEnd() - hostStartA; > > It's strange that the order of words is different in old and new variables, > "host start" vs. "length host".
Landed in
r58219
with this correction.
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