Closed
Bug 1242961
Opened 9 years ago
Closed 9 years ago
nsStandardURL still allows to build valid nsIURIs longer than network.standard-url.max-length
Categories
(Core :: Networking, defect)
Tracking
()
RESOLVED
FIXED
mozilla47
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: mak, Assigned: mak)
References
Details
(Keywords: regression)
Attachments
(1 file)
How I reached this point is explained in https://bugzilla.mozilla.org/show_bug.cgi?id=1240013#c6
Here is a sum up:
After bug 1135354 it should not be possible to build an nsIURI longer than net_GetURLMaxLength().
Unfortunately the patch in bug 1135354 addressed the SetSpec case and other cases going through SetSpec, but not the other cases that allow to build a valid nsIURI and then transform it into an invalid one. For example replacing the ref with a huge one.
This is a problem when some code assumes a spec from an nsIURI should always allow to rebuild a valid nsIURI.
I think I can try to make a patch.
Assignee | ||
Comment 1•9 years ago
|
||
Looks like the following APIs are unsafe regarding the spec length check, since they directly manipulate mSpec:
nsStandardURL::SetScheme
nsStandardURL::SetUserPass
nsStandardURL::SetUsername
nsStandardURL::SetPassword
nsStandardURL::SetHost
nsStandardURL::SetPort
nsStandardURL::SetQuery
nsStandardURL::SetRef
nsStandardURL::SetFileName
nsStandardURL::Read
Assignee | ||
Comment 2•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/32763/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/32763/
Attachment #8713188 -
Flags: review?(valentin.gosu)
Comment 3•9 years ago
|
||
Comment on attachment 8713188 [details]
MozReview Request: Bug 1242961 - nsStandardURL still allows to build valid nsIURIs longer than network.standard-url.max-length. r=valentin
https://reviewboard.mozilla.org/r/32763/#review29595
This looks great! Thanks for adding unit tests.
Attachment #8713188 -
Flags: review?(valentin.gosu) → review+
Assignee | ||
Updated•9 years ago
|
Flags: in-testsuite+
Comment 5•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Updated•9 years ago
|
Version: unspecified → 39 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•