Skip Menu |
 

This queue is for tickets about the Net-IDN-Encode CPAN distribution.

Report information
The Basics
Id: 127057
Status: patched
Priority: 0/
Queue: Net-IDN-Encode

People
Owner: CFAERBER [...] cpan.org
Requestors: shin [...] kojima.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: Shin Kojima <shin [...] kojima.org>
Subject: [PATCH 2/2] Fix domain_to_unicode AllowUnassigned param
Date: Fri, 7 Sep 2018 11:58:03 +0900
To: bug-Net-IDN-Encode [...] rt.cpan.org
From: Shin Kojima <shin [...] kojima.org>
Download (untitled) / with headers
text/plain 1.8k
Signed-off-by: Shin Kojima <shin@kojima.org> --- lib/Net/IDN/UTS46.pm | 1 - t/domain_to_unicode.t | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Net/IDN/UTS46.pm b/lib/Net/IDN/UTS46.pm index 11f5702..77643d1 100644 --- a/lib/Net/IDN/UTS46.pm +++ b/lib/Net/IDN/UTS46.pm @@ -114,7 +114,6 @@ sub _process { _validate_label($l, %param, 'TransitionalProcessing' => 0, - 'AllowUnassigned' => 0, ## keep the Punycode version ) unless $@; } else { _validate_label($l,%param,'_AssumeNFC' => 1); diff --git a/t/domain_to_unicode.t b/t/domain_to_unicode.t index 609484a..458b179 100755 --- a/t/domain_to_unicode.t +++ b/t/domain_to_unicode.t @@ -3,7 +3,7 @@ use strict; BEGIN { binmode STDOUT, ':utf8'; binmode STDERR, ':utf8'; } -use Test::More tests => 1 + 14; +use Test::More tests => 1 + 15; use Test::NoWarnings; use Net::IDN::Encode qw(:all); @@ -14,6 +14,8 @@ is(eval{domain_to_unicode('XN--MLLER-KVA')} || $@, 'müller', 'single uppercase is(eval{domain_to_unicode('www.jürg.xn--mller-kva.com', )} || $@, 'www.jürg.müller.com', 'mixed utf8/ace/ascii (to_unicode)'); is(eval{domain_to_unicode('www.a.b。c.d。com', )} || $@, 'www.a.b。c.d。com', 'mixed dots (to_unicode)'); +is(eval{domain_to_unicode("www.xn--4s9h.example", AllowUnassigned => 1)} || $@, "www.\x{1F985}.example", 'Unicode 9.0 emoji'); + is(eval{domain_to_unicode('www.ä ö ü ß.example', 'UseSTD3ASCIIRules' => 0)}, 'www.ä ö ü ß.example', 'blank (without STD3 rules) (to_unicode)') or diag $@; is(eval{domain_to_unicode('www.ä ö ü ß.example', 'UseSTD3ASCIIRules' => 1)}, undef, 'blank (without STD3 rules) (to_unicode pass-through)') or diag $@; is(eval{domain_to_unicode('www.xn-- -7kav3ivb.example', 'UseSTD3ASCIIRules' => 0)}, 'www.ä ö ü ß.example', 'blank (with STD3 rules) (to_unicode)') or diag $@; -- 2.18.0
Download (untitled) / with headers
text/plain 150b
Thank you for reporting. I've just uploaded a development version that fixes this and will release it as 2.401 once the CPAN testers results are fine.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.