Closed Bug 666706 Opened 14 years ago Closed 14 years ago

Don't pass IPv6 literals to the effective TLD service, since the brackets prevent them from being recognized as IPs

Categories

(Firefox :: Address Bar, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 7

People

(Reporter: dao, Assigned: dao)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch tests (obsolete) — Splinter Review
I generated the attached tests based on <http://hg.mozilla.org/mozilla-central/rev/8b5646a07963>. The eTLD service fails for every host containing a dot, e.g. [::192.168.1.1], for which it considers "1.1]" to be the base domain.
Or maybe the problem is that I'm passing the host with the brackets to getBaseDomainFromHost?
Component: Networking → Location Bar
Product: Core → Firefox
QA Contact: networking → location.bar
Summary: Effective TLD service doesn't handle IPv6 literals containing dots correctly → Don't pass IPv6 literals to the effective TLD service, since the brackets prevent them from being recognized as IPs
Attached patch patchSplinter Review
Assignee: nobody → dao
Attachment #541454 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #541604 - Flags: review?(gavin.sharp)
There's PR_StringToNetAddr logic in nsEffectiveTLDService::GetBaseDomainInternal that I would assume should be catching this. Does it just not handle the bracket format? I'm not very familiar with ipv6 IP address formats.
(In reply to comment #3) > There's PR_StringToNetAddr logic in > nsEffectiveTLDService::GetBaseDomainInternal that I would assume should be > catching this. Does it just not handle the bracket format? I'm not very > familiar with ipv6 IP address formats. IIRC it doesn't handle that format.
Passing them without the brackets to getBaseDomainFromHost works, but removing the brackets in order to do that would be pointless, as getBaseDomainFromHost would just throw anyway.
getBaseDomainFromHost should probably also throw when the brackets are included, rather than returning a bogus result.
Comment on attachment 541604 [details] [diff] [review] patch can you file a followup for that and add a comment?
Attachment #541604 - Flags: review?(gavin.sharp) → review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 7
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: