Closed
Bug 388281
Opened 17 years ago
Closed 17 years ago
[FIX]nsStandardURL::SetPort needs to update authority length
Categories
(Core :: Networking, defect, P1)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha8
People
(Reporter: bzbarsky, Assigned: bzbarsky)
Details
(Keywords: fixed1.8.1.8)
Attachments
(1 file, 2 obsolete files)
2.88 KB,
patch
|
dveditz
:
approval1.8.1.8+
|
Details | Diff | Splinter Review |
See bug 388186 comment 13.
Flags: in-testsuite?
Assignee | ||
Updated•17 years ago
|
Priority: -- → P1
Summary: nsStandardURL::SetPort needs to update authority length → [FIX]nsStandardURL::SetPort needs to update authority length
Target Milestone: --- → mozilla1.9beta1
Assignee | ||
Comment 1•17 years ago
|
||
I think we should fix this on branches too, since security code depends on origins, which are hostPort. Seem reasonable?
Attachment #272459 -
Flags: superreview?(cbiesinger)
Attachment #272459 -
Flags: review?(cbiesinger)
Assignee | ||
Comment 2•17 years ago
|
||
This handles SetPort() to mDefaultPort more correctly, imo.
Attachment #272459 -
Attachment is obsolete: true
Attachment #272460 -
Flags: superreview?(cbiesinger)
Attachment #272460 -
Flags: review?(cbiesinger)
Attachment #272459 -
Flags: superreview?(cbiesinger)
Attachment #272459 -
Flags: review?(cbiesinger)
Comment 3•17 years ago
|
||
Comment on attachment 272460 [details] [diff] [review] Slightly better + mAuthority.mLen += start - mPath.mPos; I think it would be clearer if you wrote this as: mAuthority.mLen -= mPath.mPos - start; perhaps store that length in a temp. var even and pass that to Cut and -=
Attachment #272460 -
Flags: superreview?(cbiesinger)
Attachment #272460 -
Flags: superreview+
Attachment #272460 -
Flags: review?(cbiesinger)
Attachment #272460 -
Flags: review+
Assignee | ||
Comment 4•17 years ago
|
||
I made that code read: // need to remove the port number from the URL spec PRUint32 start = mHost.mPos + mHost.mLen; PRUint32 lengthToCut = mPath.mPos - start; mSpec.Cut(start, lengthToCut); mAuthority.mLen -= lengthToCut; ShiftFromPath(-lengthToCut); I think we should take this on branch; right now if a principal's URI gets SetPort called on it somewhere along the way, the principals origin will actually be wrong.
Attachment #272460 -
Attachment is obsolete: true
Attachment #272596 -
Flags: approval1.8.1.6?
Attachment #272596 -
Flags: approval1.8.0.13?
Assignee | ||
Comment 6•17 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 17 years ago
Flags: in-testsuite? → in-testsuite+
Resolution: --- → FIXED
Updated•17 years ago
|
Attachment #272596 -
Flags: approval1.8.0.13? → approval1.8.0.14?
Comment 7•17 years ago
|
||
Comment on attachment 272596 [details] [diff] [review] Updated to comments approved for 1.8.1.7, a=dveditz for release-drivers
Attachment #272596 -
Flags: approval1.8.1.7?
Attachment #272596 -
Flags: approval1.8.1.7+
Attachment #272596 -
Flags: approval1.8.0.14?
You need to log in
before you can comment on or make changes to this bug.
Description
•