Closed Bug 466264 Opened 11 years ago Closed 11 years ago

decodeURI should not decode scope id of IPv6 address literal

Categories

(Core :: JavaScript Engine, defect)

x86
Windows XP
defect
Not set

Tracking

()

RESOLVED INVALID

People

(Reporter: masa141421356, Unassigned)

References

Details

At Windows, scope id of IPv6 address literal contains two decimal digit.

If host name in URL is writen by IPv6 address literal with scope id,
It will contain "%" in host part.
For example:
http://[fe80::XXXX:XXXX:123%31]/

It should not be decoded as http://[fe80::XXXX:XXXX:1231]/

Steps to reproduce
1. Enable IPv6 on your Windows PC and your network.
2. Setup Apache to somewhere and enable IPv6.
3. Apply patch of bug 464162 and Build Firefox Trunk.
4. Access to Apache using IPv6 address literal with scopeId.

Actual result:
Location bar shows scopeId parts as decoded character

Expected result:
Location bar shows scopeId without decoding.

Additional information.

At current implementation, location bar decodes URL using
http://hg.mozilla.org/mozilla-central/annotate/9d40cd95d9c9/browser/base/content/browser.js#l1973
Blocks: 464162
No longer blocks: IPv6
According to RFC4007 section 11.7, Scope id's delimiter "%" is required to escaped as "%25".
decodeURI seems to be NOT guilty.

Problem seems to exist on somewhere other than decodeURI.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.