As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact
Last Comment Bug 210734 - IDN: Invalid codepoint encoded in ACE label
: IDN: Invalid codepoint encoded in ACE label
: fixed1.4.1
Product: Core
Classification: Components
Component: Internationalization (show other bugs)
: Trunk
: x86 Windows XP
: P1 major (vote)
: mozilla1.5alpha
Assigned To: Darin Fisher
: Yuying Long
: Makoto Kato [:m_kato]
: 211320 (view as bug list)
Depends on:
Blocks: 224532
  Show dependency treegraph
Reported: 2003-06-25 23:39 PDT by Yoshiro, YONEYA
Modified: 2011-08-05 21:32 PDT (History)
6 users (show)
asa: blocking1.4.1+
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

v1 patch (983 bytes, patch)
2003-07-07 08:16 PDT, Darin Fisher
nhottanscp: review+
bzbarsky: superreview+
asa: approval1.4.1+
Details | Diff | Splinter Review

Description User image Yoshiro, YONEYA 2003-06-25 23:39:46 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624

When users entered Alphabet or Numerics in compatible (i.e Full-Width) form, the
resulting ACE label (both Punycode and RACE) includes 0x0 in it. For example:
www.U+FF4A U+FF44 U+FF4E is expected to be nameprepped and changed
into, but the result is

Reproducible: Always

Steps to Reproduce:
1. enter at address bar

Actual Results:  
the entered address was changed into, and DNS fails

Expected Results:  
jdna part should be nameprepped into jdna, i.e.
Comment 1 User image Katsuhiko Momoi 2003-06-26 02:16:17 PDT
Confirmed. When we use Japanese Roman letters (either upper case or
lowercase), NamePrep does not produce the correct result.
Comment 2 User image Klaus Malorny 2003-07-02 06:46:12 PDT
Another example is "maß", i.e. "bei U+00DF"; during NamePrep, the german double
s is converted into two s and no non-LDH character remains. So it should not be
converted to Punycode after the normalization, opposite to how it is done
Comment 3 User image Klaus Malorny 2003-07-02 06:52:52 PDT
Sorry, the example went wrong: it is maß -> U+006D U+0061 U+00DF
Comment 4 User image Darin Fisher 2003-07-07 07:50:07 PDT
We branch into IDN code whenever a hostname contains non-ASCII codepoints.  So,
it seems to me that as a last step, our IDN converter needs to verify that the
nameprepped hostname also contains non-ASCII values before we tack on the xn--
prefix.  If I am correct, then this should be fairly easy to fix.
Comment 5 User image Darin Fisher 2003-07-07 08:16:37 PDT
Created attachment 127174 [details] [diff] [review]
v1 patch
Comment 6 User image Darin Fisher 2003-07-07 08:31:18 PDT
-> me
Comment 7 User image Katsuhiko Momoi 2003-07-07 09:21:36 PDT
Darin, I tried your patch on Mozilla 1.4 branch with the example 
filed by the reporter. It works when the patch is applied.
I also tried a case when the user enters www.(JPN name).jp (in JPN full-
width Roman characters), this too works with the patch. 

Klaus, Yoneya-san, and others, please supply other real life examples
for verification. Thanks.
Comment 8 User image nhottanscp 2003-07-07 18:23:50 PDT
Comment on attachment 127174 [details] [diff] [review]
v1 patch

Comment 9 User image Darin Fisher 2003-07-07 18:26:16 PDT
Comment on attachment 127174 [details] [diff] [review]
v1 patch

bz: please see comment #4 for an explanation of this patch.
Comment 10 User image nhottanscp 2003-07-07 18:27:57 PDT
I wonder if full-width alphabet only domain names are accepted for registration.
I am not sure about the official guideline but I think that could be confusing
(also a risk for spoofing).
Yoneya san, does JPNIC allow those string for the registration?
Comment 11 User image Darin Fisher 2003-07-07 18:57:54 PDT
Comment 12 User image Yoshiro, YONEYA 2003-07-07 22:03:39 PDT
This is re-comment to comment #10.

JPRS (is JP registory since Apr 2002) accepts full-width Alpha-Numerics in
inputted string for registration.  But those are NAMEPREPped by registration
system at the registration time and never appear in registered domain name.

Allowed Japanese characters for JP domain name are listed on
Comment 13 User image Darin Fisher 2003-07-08 10:25:05 PDT
i think this patch should be included with any future 1.4 branch releases.
Comment 14 User image Darin Fisher 2003-07-08 11:50:48 PDT
*** Bug 211320 has been marked as a duplicate of this bug. ***
Comment 15 User image Darin Fisher 2003-07-08 12:27:01 PDT
Comment on attachment 127174 [details] [diff] [review]
v1 patch

this is an important bug to get fixed on the 1.4 branch.  it prevents IDN from
working with many sites.
Comment 16 User image Katsuhiko Momoi 2003-07-08 15:36:13 PDT
Comment #15 is so true that we should definitely check this 
into 1.4 so that any future releases from 1.4 can benefit from this
Comment 17 User image Yoshiro, YONEYA 2003-07-08 20:13:21 PDT
Thanks to all, I found this bug was fixed in 20030708 trunk.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5a) Gecko/20030708
Comment 18 User image Asa Dotzler [:asa] 2003-08-01 18:51:41 PDT
Comment on attachment 127174 [details] [diff] [review]
v1 patch

a=asa (on behalf of drivers) for checkin to the 1.4 branch.
Comment 19 User image Darin Fisher 2003-08-02 10:01:42 PDT

Note You need to log in before you can comment on or make changes to this bug.