Closed
Bug 122787
Opened 23 years ago
Closed 23 years ago
(nsIURI) nsStandardURL::SetFileName doesn't recalculate mPath
Categories
(Core :: Networking, defect, P1)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla0.9.9
People
(Reporter: Brade, Assigned: darin.moz)
Details
Attachments
(1 file, 1 obsolete file)
|
5.05 KB,
patch
|
dougt
:
review+
mscott
:
superreview+
|
Details | Diff | Splinter Review |
For publishing, I came across this interesting bug.
For publishing we create an nsIURI with an url that doesn't have the file
extension. The extension is added later. When the code calls
nsStandardURL::SetFileName to set the name with the extension, everything is
reset except mPath which is left as the path without the extension. During
publishing, the HTTP put tries to GetPath but it doesn't get the whole path.
Regardless, this seems like it could be a pretty serious problem (if someone
SetFileName to "" or something less than what was there.
I have a fix in my own tree but I'm not an expert in this area so I'd like some
idea of the right approach (manually fix the mLen for mPath or call some other
method to do the recalculation).
| Assignee | ||
Comment 1•23 years ago
|
||
brade: can you please provide some sample code that would demonstrate the
problem? thx!
| Assignee | ||
Comment 2•23 years ago
|
||
ok, i have a way to repro the problem -> 0.9.9 critical
Severity: major → critical
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla0.9.9
| Assignee | ||
Comment 3•23 years ago
|
||
verified this patch using xpcshell...
url.spec = "http://foo.com/bar/baz"
url.fileName = "baz.html"
then i checked all of the nsIURI/nsIURL attributes and didn't see any problems.
| Assignee | ||
Comment 4•23 years ago
|
||
revised per comments from brade
Attachment #67285 -
Attachment is obsolete: true
Comment 5•23 years ago
|
||
Comment on attachment 67298 [details] [diff] [review]
v1.1 patch
r=dougt
Attachment #67298 -
Flags: review+
Comment 6•23 years ago
|
||
Comment on attachment 67298 [details] [diff] [review]
v1.1 patch
sr=mscott
Attachment #67298 -
Flags: superreview+
| Assignee | ||
Comment 7•23 years ago
|
||
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•