Base domain formatting should use display IDN format
Categories
(Firefox :: Address Bar, defect, P3)
Tracking
()
People
(Reporter: hsivonen, Unassigned)
References
Details
(Whiteboard: [sng])
In reference to https://phabricator.services.mozilla.com/D206579#inline-1195440 in the review of bug 1889536:
https://searchfox.org/mozilla-central/rev/3d173a6ad865eb778eb7a85de900e92774559ed6/browser/components/urlbar/UrlbarValueFormatter.sys.mjs#382 undoes Services.eTLD.getBaseDomainFromHost(origin); turning the base domain to the ASCII/Punycode form by calling IDNService.convertACEtoUTF8, i.e. by running the pure ToUnicode operation as opposed to calling convertToDisplayIDN, which runs ToUnicode in general but ToASCII for labels that we consider to have confusables.
AFAICT, this means that the URL bar implicitly makes the assumption that the base domain can't have confusables. While this is hopefully generally true, I think we can't categorically expect never to encounter an exception, though it might be hard to get the Public Suffix List to include an exception. Therefore, it seems proper to convert to display IDN here.
(This is one of the two uses of the pure ToUnicode operation in the entire Firefox, both of which are questionable. If we managed to make both cases use something more appropriate than pure ToUnicode, we could stop offering API surface for pure ToUnicode, which would nicely steer future code towards converting to display IDN, etc.)
Comment 1•1 year ago
|
||
This needs more debugging and investigation to figure out what's happening in the address bar, but the effect of this might be likely be related to what is being de-emphasized/emphasized in the address bar. We should understand the how and why of this part of the code.
Updated•1 year ago
|
Comment 2•1 month ago
|
||
I think bug 1916410 solved this
Updated•1 month ago
|
Description
•