Created attachment 541454 [details] [diff] [review] tests 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
Created attachment 541604 [details] [diff] [review] patch
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
Last Resolved: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 7
You need to log in before you can comment on or make changes to this bug.