Last Comment Bug 763208 - Update .jp entry in PSL
: Update .jp entry in PSL
Status: RESOLVED FIXED
[leave open]
:
Product: Core
Classification: Components
Component: Networking: Domain Lists (show other bugs)
: unspecified
: All All
: -- normal with 1 vote (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-09 10:27 PDT by Gervase Markham [:gerv]
Modified: 2012-08-12 23:50 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
JPRS submitted diff (50.06 KB, text/plain)
2012-06-09 10:28 PDT, Gervase Markham [:gerv]
no flags Details
Patch v.2 (34.64 KB, patch)
2012-06-14 03:43 PDT, Gervase Markham [:gerv]
no flags Details | Diff | Splinter Review

Description Gervase Markham [:gerv] 2012-06-09 10:27:50 PDT
JPRS writes:

JPRS will launch a new domain name space called
"Prefecture Type JP Domain Name" under .JP, as of November 18 2012.
<http://jprs.co.jp/en/topics/2012/120528.html>

Due to the launch of the service,
please update the part of "jp" in the PUBLIC SUFFIX LIST.

The following three files relevant to update the list are attached to
this e-mail.

   - effective_tld_names.dat.original.txt   (original list, 2012/5/29)
   - effective_tld_names.dat.new.txt        (updated list)
   - effective_tld_names.dat.diff.txt       (diff file)


Gerv
Comment 1 Gervase Markham [:gerv] 2012-06-09 10:28:46 PDT
Created attachment 631674 [details]
JPRS submitted diff

This diff has a number of changes outside the .jp section which will need to not be included.

Gerv
Comment 2 Gervase Markham [:gerv] 2012-06-14 03:43:08 PDT
Created attachment 633092 [details] [diff] [review]
Patch v.2

Improved diff submitted by JPRS, without extraneous changes.

Gerv
Comment 3 Gervase Markham [:gerv] 2012-07-04 08:09:10 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/290afd57d2a8

Gerv
Comment 5 Petar Bogdanovic 2012-07-05 07:27:09 PDT
(In reply to Ehsan Akhgari [:ehsan] from comment #4)
> https://hg.mozilla.org/mozilla-central/rev/290afd57d2a8

Change above breaks following tests:

        name                  result               expected
        ----                  ------               --------
FAIL:	c.kyoto.jp            c.kyoto.jp           NULL
FAIL:	b.c.kyoto.jp          c.kyoto.jp           b.c.kyoto.jp
FAIL:	a.b.c.kyoto.jp        c.kyoto.jp           b.c.kyoto.jp

See http://publicsuffix.org/list/test.txt
Comment 6 Masatoshi Kimura [:emk] 2012-07-05 11:41:20 PDT
That's expected. JPRS obsoleted Geographic Type JP Domain Name (such as b.c.kyoto.jp) in favor of Prefecture Type JP Domain Name (such as c.kyoto.jp).
So "b.c.kyoto.jp" is no longer a 4th level Geographic Type JP Domain Name "b.c.kyoto.jp", but a subdomain of 3rd level Prefecture Type JP Domain Name "c.kyoto.jp".
But already registered Geographic Type JP Domain Names are retained. So those (1679!) domain names have been added in the patch.
Tests should be updated such as the following:
-checkPublicSuffix('c.kyoto.jp', NULL);
-checkPublicSuffix('b.c.kyoto.jp', 'b.c.kyoto.jp');
-checkPublicSuffix('a.b.c.kyoto.jp', 'b.c.kyoto.jp');
+checkPublicSuffix('c.kyoto.jp', 'c.kyoto.jp');	# Prefecture Type.
+checkPublicSuffix('b.c.kyoto.jp', 'c.kyoto.jp');	# Prefecture Type.
+checkPublicSuffix('a.b.c.kyoto.jp', 'c.kyoto.jp');	# Prefecture Type.
+checkPublicSuffix('uji.kyoto.jp', NULL);	# Geographic Type.
+checkPublicSuffix('b.uji.kyoto.jp', 'b.uji.kyoto.jp');	# Geographic Type.
+checkPublicSuffix('a.b.uji.kyoto.jp', 'b.uji.kyoto.jp');	# Geographic Type.
Comment 7 Masatoshi Kimura [:emk] 2012-07-05 11:46:11 PDT
(BTW I think the test should be included in the tree.)
Comment 8 Petar Bogdanovic 2012-07-05 12:02:46 PDT
(In reply to Masatoshi Kimura [:emk] from comment #7)
> (BTW I think the test should be included in the tree.)

Yes, especially since there are other broken tests:

	checkPublicSuffix('example.example', NULL);
	checkPublicSuffix('b.example.example', NULL);
	checkPublicSuffix('a.b.example.example', NULL);

Default rule is `*' so `example.example' is the result to be expected.

Additionally, it would be nice if the tests were language agnostic, so
instead of:

	checkPublicSuffix('b.c.kyoto.jp', 'c.kyoto.jp');	# Prefecture Type.
	checkPublicSuffix('a.b.c.kyoto.jp', 'c.kyoto.jp');	# Prefecture Type.
	checkPublicSuffix('uji.kyoto.jp', NULL);		# Geographic Type.
	checkPublicSuffix('b.uji.kyoto.jp', 'b.uji.kyoto.jp');	# Geographic Type.

three columns would suffice:

	b.c.kyoto.jp		c.kyoto.jp		Prefecture Type.
	a.b.c.kyoto.jp		c.kyoto.jp		Prefecture Type.
	uji.kyoto.jp		NULL			Geographic Type.
	b.uji.kyoto.jp		b.uji.kyoto.jp		Geographic Type.

and simplify parsing.
Comment 9 Rob Stradling 2012-07-31 04:28:25 PDT
I was just about to email Gerv about the .jp tests that are now broken, but then I happened to stumble upon this bug.  FWIW, I was going to suggest changing the block of .jp tests to...

checkPublicSuffix('jp', NULL);
checkPublicSuffix('test.jp', 'test.jp');
checkPublicSuffix('www.test.jp', 'test.jp');
checkPublicSuffix('ac.jp', NULL);
checkPublicSuffix('test.ac.jp', 'test.ac.jp');
checkPublicSuffix('www.test.ac.jp', 'test.ac.jp');
checkPublicSuffix('kyoto.jp', NULL);
checkPublicSuffix('test.kyoto.jp', 'test.kyoto.jp');
checkPublicSuffix('ide.kyoto.jp', NULL);
checkPublicSuffix('b.ide.kyoto.jp', 'b.ide.kyoto.jp');
checkPublicSuffix('a.b.ide.kyoto.jp', 'b.ide.kyoto.jp');
checkPublicSuffix('c.kobe.jp', NULL);
checkPublicSuffix('b.c.kobe.jp', 'b.c.kobe.jp');
checkPublicSuffix('a.b.c.kobe.jp', 'b.c.kobe.jp');
checkPublicSuffix('city.kobe.jp', 'city.kobe.jp');
checkPublicSuffix('www.city.kobe.jp', 'city.kobe.jp');
Comment 10 Rob Stradling 2012-07-31 04:33:22 PDT
(In reply to Petar Bogdanovic from comment #8)
> Yes, especially since there are other broken tests:
> 
> 	checkPublicSuffix('example.example', NULL);
> 	checkPublicSuffix('b.example.example', NULL);
> 	checkPublicSuffix('a.b.example.example', NULL);
> 
> Default rule is `*' so `example.example' is the result to be expected.

Good catch.  I guess I must have missed the default * rule when I originally prepared the test data.
Comment 11 Rob Stradling 2012-07-31 04:40:00 PDT
Gerv,
I think the "Example" section on http://publicsuffix.org/list/ would also benefit from being updated to adhere to the latest .jp rules.  Just to avoid any confusion.
Comment 12 Gervase Markham [:gerv] 2012-08-02 06:12:30 PDT
I was happy to host the tests when submitted, but I am not committed to maintaining them! :-) However, we should take Rob's patch, and fix the web page. Can someone file a new bug for that and assign it to me?

Thanks,

Gerv
Comment 13 Rob Stradling 2012-08-12 23:50:20 PDT
(In reply to Gervase Markham [:gerv] from comment #12)
> I was happy to host the tests when submitted, but I am not committed to
> maintaining them! :-) However, we should take Rob's patch, and fix the web
> page. Can someone file a new bug for that and assign it to me?

Gerv, I filed bug 779845.

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