nsStdURL::ReplaceDotMess treats \ after # and ? incorrectly

VERIFIED FIXED in M14

Status

()

Core
Networking
P3
normal
VERIFIED FIXED
19 years ago
18 years ago

People

(Reporter: Heikki Toivonen (remove -bugzilla when emailing directly), Assigned: Gagan)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

ReplaceDotMess() switches all \ to / in URL. This is wrong, it should not touch
them after # or ?.
Created attachment 1595 [details] [diff] [review]
Patch, do not touch stuff after delimiters ";?#"

Updated

19 years ago
Target Milestone: M14

Updated

19 years ago
Blocks: 13449
After thinking more about this, I realized this could be a no-win situation.
Clearly, ReplaceDotMess() should fix the problems in any part of the URL that is
part of a file path/name. But it is impossible to tell for sure what is a path
and what is not.

Look at:

http://some.com/foo?\cgi-bin\myquery;par1\bar;"\*"

Quite obviously "\cgi-bin\myquery" is a path and conversion should happen. But
what about "par1\bar"? It could be a path or not. As to '"\*"', it looks like it
is just a string to be passed so we probably shouldn't touch it.

Should read the URL spec again to see if it has anything to say...

Comment 3

19 years ago
I have a fix for this, waiting for review ... see bug 13311 ... it is part of a
bigger patch to solve some more URL parsing problems. As to the additional
comments, I think heikki is right, it is a no win situation. Using
ReplaceDotMess only on the path (everything before ;?#) seems to me is doing the
least damage.

Comment 4

19 years ago
fix checked in ...

Updated

19 years ago
QA Contact: paulmac → tever
(Assignee)

Updated

19 years ago
Status: NEW → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED
(Assignee)

Comment 5

19 years ago
thanks Andreas.

Comment 6

18 years ago
Bulk move of all Necko (to be deleted component) bugs to new Networking

component.
Verified these in debugger, nsStdURL:GetSpec() with following URLs:

target.html?/1/3#/5/6
target.html?/1/3#/5/6/slot('?#/')
target.html?/1/3#/5/6/slot('\?#/')

All the member variables seem to hold correct values.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.