Open
Bug 196305
Opened 22 years ago
Updated 2 years ago
[Cookie Manager] IDN site displayed as punycode in site column
Categories
(Core :: Internationalization, enhancement)
Tracking
()
NEW
People
(Reporter: baffclan, Unassigned)
References
()
Details
(Keywords: helpwanted, intl)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4a) Gecko/20030306
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4a) Gecko/20030306
Can not read IDN site in "Cookie Sites" tab on CookieManager.
Cookperm.txt is writen by UTF-8.
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1•22 years ago
|
||
darin: if I understood your explanation of IDN goodness the other day, this is
wontfix, right? (there's actually no way to fix it either, since we just have
some mangled-looking ascii value that happens to mean something to DNS?)
Sorry, Component is change.
Cookies -> Internationalization
Comment 3•22 years ago
|
||
dwitte: no actually we can fix this. we just have to be very careful about how
we handle hostnames. we can use nsIIDNService to convert between the ASCII
compatible (garbage looking) encoding to UTF-8 and back again. cookie manager
needs to be smart about displaying only the unicode version. but, i think there
are bigger problems with cookies in general working with GetHost when it should
be working with GetAsciiHost, etc.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → Future
Updated•22 years ago
|
Comment 5•22 years ago
|
||
ok, pulling this into the 1.4 milestone.
Target Milestone: Future → mozilla1.4beta
Comment 6•22 years ago
|
||
great, so we have a magical nsIIDNService ;)
so the fix consists of the following?
a) switch to GetAsciiHost everywhere in cookie code
b) use a ->unichar conversion, and a call to nsIIDNService, when we need to
display the host
note that (a) has been done in the phase 2 patch; permissions will also need to
be updated (may already be done in mvl's latest patch).
(btw, I presume nsIIDNService knows when it's getting an IDN ASCII value, by
some special prefix in the string?)
Comment 7•22 years ago
|
||
your plan sounds right on...
>(btw, I presume nsIIDNService knows when it's getting an IDN ASCII value, by
>some special prefix in the string?)
yes. there are special ASCII valued prefixes defined by the IDN spec, various
drafts, and fun prototype implementations. or something like that ;-)
Updated•22 years ago
|
Severity: normal → enhancement
Priority: -- → P5
Comment 9•20 years ago
|
||
*** Bug 245160 has been marked as a duplicate of this bug. ***
Reporter | ||
Comment 10•20 years ago
|
||
I cannot read Punycode.
Please decode Punycode to IDN.
Summary: [Cookie Manager] Can not read IDN site in "Cookie Sites" → [Cookie Manager] IDN site displaied Punycode in site column
Comment 11•20 years ago
|
||
The hosts come from nsIPermission.idl.
54 readonly attribute AUTF8String host;
Is a 'host' thoughout mozilla genally understood to be already decoded? In other
words, should the patch touch permission code or cookieviewer code?
Summary: [Cookie Manager] IDN site displaied Punycode in site column → [Cookie Manager] IDN site displayed as punycode in site column
Updated•20 years ago
|
Comment 12•20 years ago
|
||
(In reply to comment #11)
> The hosts come from nsIPermission.idl.
> 54 readonly attribute AUTF8String host;
> Is a 'host' thoughout mozilla genally understood to be already decoded? In other
> words, should the patch touch permission code or cookieviewer code?
Hostnames in Mozilla, especially when passed as an AUTF8String are expected to
be IDN. However, it is possible for ACE versions of the Hostnames to be passed
through this API. The cookie code deals almost entirely with ACE hostnames.
But, for UI purposes it really should be dealing with IDN. I think we probably
need to add some careful conversions between IDN and ACE in the cookie service.
The cookie service should accept input as either IDN or ACE, treat them as
equivalents, and then pass them out as IDN.
Comment 13•20 years ago
|
||
It's possible that we may need to / want to make similar changes to
nsPermissionManager. Perhaps it should support input that is either IDN or ACE,
but my hope is that we can deal almost entirely with IDN and only convert to ACE
when working with low-level protocols (e.g., the domain attribute of a cookie).
Comment 14•20 years ago
|
||
hmm... can you point me to some resources explaining ACE and IDN?
with regard to cookies... what do you think would be the neatest blue-skies
solution? could we deal entirely with IDN, or do we require ACE (e.g. when
comparing hostnames, as you implied)?
Comment 15•20 years ago
|
||
(In reply to comment #14)
> hmm... can you point me to some resources explaining ACE and IDN?
heh :-)
familiarize yourself with nsIIDNService. it has methods to test whether or not
a string is ACE encoded. it also has methods to convert between ACE and IDN.
IDN implies a non-ASCII, UTF-8 encoded hostname string. you can test if a
hostname is IDN, by testing whether or not it contains non-ASCII characters.
%-encoding is not allowed in hostnames, so you don't have to worry about that.
nsIIDNService also has a method that allows you to normalize an IDN to the
canonical form. the canonical form is also UTF-8 encoded. to compare to
hostnames, you either need to compare the canonical form or the ACE encoded
version. for cookie strings, you are working with ASCII only domain names, so
you need to work with ACE.
Updated•18 years ago
|
Assignee: darin → smontagu
Status: ASSIGNED → NEW
QA Contact: tever → amyy
Target Milestone: Future → ---
Updated•15 years ago
|
QA Contact: amyy → i18n
Reporter | ||
Comment 16•14 years ago
|
||
"新宿駅.jp" is recorded as "xn--oct34u4y7b.jp" in cookies.sqlite .
URL: http://新宿駅.jp/
Comment 17•3 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.
Assignee: smontagu → nobody
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•