Open
Bug 667159
Opened 14 years ago
Updated 1 year ago
Effective TLD service should reject IPv6 literals in brackets
Categories
(Core :: Networking, defect, P3)
Core
Networking
Tracking
()
NEW
People
(Reporter: dao, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-backlog])
Spun-off from bug 666706: For [::192.168.1.1], for instance, getBaseDomainFromHost returns "1.1]" rather than throwing NS_ERROR_HOST_IS_IP_ADDRESS.
Comment 1•14 years ago
|
||
Why were you passing brackets in the first place? Brackets are not considered as a part of IPv6 address. You should strip brackets before passing the address to Effective TLD service.
Reporter | ||
Comment 2•14 years ago
|
||
(In reply to comment #1)
> Why were you passing brackets in the first place?
Because that's what you get when extracting the host as illustrated in <https://developer.mozilla.org/@api/deki/files/3267/=uri-diagram.png>.
> Brackets are not
> considered as a part of IPv6 address. You should strip brackets before
> passing the address to Effective TLD service.
There's no point in doing this on the call side -- at the point where we're detecting IPv6 addresses, we know that there's no base domain, so we wouldn't call getBaseDomainFromHost.
Comment 3•14 years ago
|
||
(In reply to comment #2)
> Because that's what you get when extracting the host as illustrated in
> <https://developer.mozilla.org/@api/deki/files/3267/=uri-diagram.png>.
Actually you extracted the host using a regular expression.
https://mxr.mozilla.org/mozilla-central/source/browser/base/content/urlbarBindings.xml#205
I got "::192.168.0.1" without brackets using the following code:
> var ioService = Components.classes["@mozilla.org/network/io-service;1"]
> .getService(Components.interfaces.nsIIOService);
> var uri = ioService.newURI('http://[::192.168.0.1]/', null, null);
> console.log(uri.host);
> There's no point in doing this on the call side -- at the point where we're
> detecting IPv6 addresses, we know that there's no base domain, so we
> wouldn't call getBaseDomainFromHost.
Then why is this bug required? You do not even call the eTLD service.
Reporter | ||
Comment 4•14 years ago
|
||
(In reply to comment #3)
> (In reply to comment #2)
> > Because that's what you get when extracting the host as illustrated in
> > <https://developer.mozilla.org/@api/deki/files/3267/=uri-diagram.png>.
> Actually you extracted the host using a regular expression.
> https://mxr.mozilla.org/mozilla-central/source/browser/base/content/
> urlbarBindings.xml#205
Right, I didn't say anything contrary to this.
> I got "::192.168.0.1" without brackets using the following code:
> > var ioService = Components.classes["@mozilla.org/network/io-service;1"]
> > .getService(Components.interfaces.nsIIOService);
> > var uri = ioService.newURI('http://[::192.168.0.1]/', null, null);
> > console.log(uri.host);
Sure.
> > There's no point in doing this on the call side -- at the point where we're
> > detecting IPv6 addresses, we know that there's no base domain, so we
> > wouldn't call getBaseDomainFromHost.
> Then why is this bug required? You do not even call the eTLD service.
That's what I'm talking about. We're not calling the eTLD service anymore since we detect IPv6 addresses. Bug 666706 added this workaround.
Updated•9 years ago
|
Whiteboard: [necko-backlog]
Comment 5•7 years ago
|
||
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P1
Comment 6•7 years ago
|
||
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: P1 → P3
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•