Priority: -- → P1
Summary: nsStandardURL::SetPort needs to update authority length → [FIX]nsStandardURL::SetPort needs to update authority length
Target Milestone: --- → mozilla1.9beta1
I think we should fix this on branches too, since security code depends on origins, which are hostPort. Seem reasonable?
This handles SetPort() to mDefaultPort more correctly, imo.
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 -=
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.
sounds good to me.
OS: Linux → All
Hardware: PC → All
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Flags: in-testsuite? → in-testsuite+
Resolution: --- → FIXED
Attachment #272596 - Flags: approval18.104.22.168? → approval22.214.171.124?
Comment on attachment 272596 [details] [diff] [review] Updated to comments approved for 126.96.36.199, a=dveditz for release-drivers
Fixed on branch.
You need to log in before you can comment on or make changes to this bug.