Closed Bug 1175769 Opened 9 years ago Closed 6 years ago

Invalid ipv6 URLs are treated as valid.

Categories

(Firefox :: Address Bar, defect, P5)

defect

Tracking

()

RESOLVED INACTIVE

People

(Reporter: markh, Unassigned)

References

Details

(Whiteboard: [unifiedautocomplete][fxsearch])

From bug 1107883:

> strings such as "![64:ff9b::8.8.8.8]" or "!@[2607:f0d0:1002:51::4]" are
> now considered valid URLs.

and they shouldn't be.
This is surprising to me... is the uriFixup code getting this wrong?
Flags: firefox-backlog+
Priority: -- → P4
Whiteboard: [unifiedautocomplete]
Whiteboard: [unifiedautocomplete] → [unifiedautocomplete][fxsearch]
Rank: 45
I am looking forward to developing bug fixes. I would like to have this bug report assigned to me so I can work on it
(In reply to bassam from comment #2)
> I am looking forward to developing bug fixes. I would like to have this bug
> report assigned to me so I can work on it

That's great! Please upload a patch and if it is going in the correct direction we'll happily assign this bug to you. In the mean time, feel free to ask any questions you have.
Mark, as per your second example "!@[2607:f0d0:1002:51::4]", it looks to me as a valid URI with HTTP authentication with "!" being the username. it's not a valid case for our problem.

The first one, though, is.
Gijs tells me :bassam found this to be tricker than it looks, and I agree :( With these URLs we enter nsDefaultURIFixup::KeywordURIFixup() and don't think it is an IPv6 URL, but *do* think the hostname is valid (as aFixupInfo->mFixedURI->GetAsciiHost() happily returns "![2001:db8::1]". None of the other heuristics in KeywordURIFixup() kick in, so we continue to treat it as a valid URL.

It *might* be possible to try and second-guess this code and have _matchUnknownUrl() in UnifiedComplete.js detect this case, but that's likely to be hacky and fragile.

I've no time to dig further into this at the moment. :bassam, thanks for having a look though.
not blocking the release of unified complete
No longer blocks: UnifiedComplete
Priority: P4 → P5
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.