Closed Bug 763208 Opened 8 years ago Closed 7 years ago

Update .jp entry in PSL

Categories

(Core :: Networking: Domain Lists, defect)

defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: gerv, Unassigned)

Details

(Whiteboard: [leave open])

Attachments

(1 file, 1 obsolete file)

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
Attached file JPRS submitted diff (obsolete) —
This diff has a number of changes outside the .jp section which will need to not be included.

Gerv
Attached patch Patch v.2Splinter Review
Improved diff submitted by JPRS, without extraneous changes.

Gerv
Attachment #631674 - Attachment is obsolete: true
Whiteboard: [leave open]
(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
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.
(BTW I think the test should be included in the tree.)
(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.
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');
(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.
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.
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
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
(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.
You need to log in before you can comment on or make changes to this bug.