Closed
Bug 498433
Opened 15 years ago
Closed 15 years ago
DOM can't parse IPv6 literal URLs
Categories
(Core :: DOM: Serializers, defect)
Core
DOM: Serializers
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
status1.9.1 | --- | .3-fixed |
People
(Reporter: lorenzo, Assigned: Biesinger)
References
()
Details
(Keywords: verified1.9.1)
Attachments
(2 files)
5.99 KB,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
6.00 KB,
patch
|
samuel.sidler+old
:
approval1.9.1.3+
|
Details | Diff | Splinter Review |
If a page contains an IPv6 literal URL such as http://[2001:4860:a003::68]/ , the URL is mangled in the DOM.
To reproduce, create an HTML file containing the following and open it in Firefox:
<html>
<body>
<a href="http://[2001:4860:a003::68]/">Test</a>
</body>
</html>
Note how the link is parsed correctly (and if you have IPv6 connectivity, works). Now select the test, right-click, and "view selection source". Note how the link has become:
<a href="http://%5B2001:4860:a003::68%5D/">Test</a>
Assignee | ||
Comment 1•15 years ago
|
||
As best as I can tell, the escaping code here is only for non-ASCII characters, so adding ASCII characters to the whitelist should be safe. compare bug 74137 which added this code.
Attachment #383323 -
Flags: superreview?(bzbarsky)
Attachment #383323 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•15 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•15 years ago
|
||
nominating for wanted, as this leads to an incorrect innerHTML of nodes containing links with IPv6 literals
Flags: wanted1.9.1.x?
Assignee | ||
Updated•15 years ago
|
OS: Linux → All
Hardware: x86 → All
Version: 1.9.1 Branch → Trunk
Updated•15 years ago
|
Attachment #383323 -
Flags: superreview?(bzbarsky)
Attachment #383323 -
Flags: superreview+
Attachment #383323 -
Flags: review?(bzbarsky)
Attachment #383323 -
Flags: review+
Comment 3•15 years ago
|
||
Comment on attachment 383323 [details] [diff] [review]
patch
I suppose this is ok, but it's not clear why we're doing escaping using nsITextToSubURI here in the first place... can you file a bug on making this sane (e.g. just using NS_Escape with the right flags)?
Assignee | ||
Comment 4•15 years ago
|
||
nsITextToSubURI also does charset conversion before escaping, right? Are you saying that this code should just always use UTF-8?
Assignee | ||
Comment 5•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Assignee | ||
Updated•15 years ago
|
Attachment #383323 -
Flags: approval1.9.1?
Assignee | ||
Comment 6•15 years ago
|
||
Comment on attachment 383323 [details] [diff] [review]
patch
This is a fairly safe patch to correctly serialize IPv6 address literals, in particular this fixes saving webpages that contain IPv6 links, and also produces correct .innerHTML for such links.
Comment 7•15 years ago
|
||
> Are you saying that this code should just always use UTF-8?
Possibly, yes. At least something to seriously consider.
Assignee | ||
Comment 8•15 years ago
|
||
filed Bug 498636 to simplify that code
Comment 9•15 years ago
|
||
Comment on attachment 383323 [details] [diff] [review]
patch
removing dead flag; please generate a new mozilla-1.9.1 patch and request approval on that.
Attachment #383323 -
Flags: approval1.9.1?
Assignee | ||
Comment 10•15 years ago
|
||
This is a fairly safe patch to correctly serialize IPv6 address literals, in
particular this fixes saving webpages that contain IPv6 links, and also
produces correct .innerHTML for such links. It's been on trunk for ~6 weeks with no filed regressions. Unit test is included, and there already are tests for this feature in general.
Attachment #391042 -
Flags: approval1.9.1.2?
Updated•15 years ago
|
Attachment #391042 -
Flags: approval1.9.1.2? → approval1.9.1.3?
Comment 11•15 years ago
|
||
Comment on attachment 391042 [details] [diff] [review]
1.9.1 patch
Not for 1.9.1.2.
Comment 12•15 years ago
|
||
Comment on attachment 391042 [details] [diff] [review]
1.9.1 patch
Approved for 1.9.1.3. a=ss
Attachment #391042 -
Flags: approval1.9.1.3? → approval1.9.1.3+
Assignee | ||
Comment 13•15 years ago
|
||
status1.9.1:
--- → .3-fixed
Comment 14•15 years ago
|
||
Verified fixed in 1.9.1 with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3pre) Gecko/20090817 Shiretoko/3.5.3pre (.NET CLR 3.5.30729).
Keywords: verified1.9.1
Updated•15 years ago
|
Flags: wanted1.9.1.x?
You need to log in
before you can comment on or make changes to this bug.
Description
•