domain highlighting doesn't work with IPv6 literals

VERIFIED FIXED in Firefox 6

Status

()

Firefox
Location Bar
VERIFIED FIXED
6 years ago
4 years ago

People

(Reporter: bws42, Assigned: dao)

Tracking

Trunk
Firefox 7
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox6 fixed)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:7.0a1) Gecko/20110525 Firefox/7.0a1
Build Identifier: Mozilla/5.0 (X11; Linux x86_64; rv:7.0a1) Gecko/20110525 Firefox/7.0a1

The domain highlighting feature added as part of bug 451833 fails to properly highlight the entire IPv6 address; it stops after the first colon.

Reproducible: Always
(Reporter)

Comment 1

6 years ago
There's an example URL in the URL field, it might not work for you as it's a local IPv6 address, but it demonstrates the problem fine.
Blocks: 451833
Version: unspecified → Trunk
(Assignee)

Comment 2

6 years ago
Created attachment 535139 [details] [diff] [review]
patch

This uses (.+?) for the host instead of ([^\/:]+), which caused this bug by excluding the colon. Since question mark makes .+ nongreedy, (?::\d+)?(?:\/|$) is needed to ensure that the host is followed by an optional port and a slash or the end of the string.
Assignee: nobody → dao
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #535139 - Flags: review?(sdwilsh)
Comment on attachment 535139 [details] [diff] [review]
patch

I sure do hate me some regular expressions.  r=sdwilsh
Attachment #535139 - Flags: review?(sdwilsh) → review+
(Assignee)

Comment 4

6 years ago
http://hg.mozilla.org/mozilla-central/rev/80356fecf627
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
status-firefox6: --- → affected
Resolution: --- → FIXED
Target Milestone: --- → Firefox 7
(Assignee)

Updated

6 years ago
Flags: in-testsuite+
(Assignee)

Updated

6 years ago
Attachment #535139 - Flags: approval-mozilla-aurora?
(Reporter)

Comment 5

6 years ago
Verified it works as expected.
Status: RESOLVED → VERIFIED

Comment 6

6 years ago
In the failure case, was the whole domain "graytext" or was it all "black text"?
(Reporter)

Comment 7

6 years ago
In the failure case the address was only black to the first colon. So given an address like dead:beef:1234::1 dead was black and the rest was not.
Attachment #535139 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
(Assignee)

Comment 8

6 years ago
http://hg.mozilla.org/releases/mozilla-aurora/rev/611741a1dedd
status-firefox6: affected → fixed
You need to log in before you can comment on or make changes to this bug.