Re: Punycode questions

2014-09-29 Thread Tony Finch
Ronald F. Guilmette r...@tristatelogic.com wrote:

 In a nutshell, I'd just like to know whether or not Punycode
 encoded strings may ever validly contain either (a) leading
 periods or else (b) two consecutive periods.  Would any strings
 that contain either of those things be considered to be valid
 Punycode encoded strings?

No. For details see RFCs 5891, 5892, and 3492.

 To be more specific and concrete about it, here is a small
 example Perl program I wrote:

ftp://ftp.tristatelogic.com/pub/punybug.pl

 When *I* run this, it prints out several Invalid punycode!
 errors.

I think that is because the function you are calling is intended for
encoding individual labels, not whole domain names.

Tony.
-- 
f.anthony.n.finch  d...@dotat.at  http://dotat.at/
Trafalgar: Cyclonic in northwest, otherwise mainly northerly or northwesterly
5 or 6. Slight or moderate. Showers in northwest. Good.
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: Punycode questions

2014-09-29 Thread Ronald F. Guilmette

In message alpine.lsu.2.00.1409291026090.18...@hermes-1.csi.cam.ac.uk,
Tony Finch d...@dotat.at wrote:

Ronald F. Guilmette r...@tristatelogic.com wrote:
 To be more specific and concrete about it, here is a small
 example Perl program I wrote:

ftp://ftp.tristatelogic.com/pub/punybug.pl

 When *I* run this, it prints out several Invalid punycode!
 errors.

I think that is because the function you are calling is intended for
encoding individual labels, not whole domain names.

Quite right sir!  Thanks for the tip!

Re-reading the man pages just now I see that I was using the
incorrect function for the conversion.  I was using the
Net::IDN::Punycode::encode_punycode but apparently I really
should instead be using Net::IDN::Encode::domain_to_ascii
which is apparently the thing that should be used for converting
complete domain names.

(Unfortunately, I've still got problems, even now that I'm using
the correct function, but those are probably due to me having
failed to upgrade my FreeBSD ports for some time now.)


___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Punycode questions

2014-09-28 Thread Ronald F. Guilmette

I hope this post won't be considered too far off topic.

I've already sent this same question off to the guy who is the
current maintainer of the Net::IDN::Punycode Perl module, but
while I'm still impatiently awaiting his response I'm thinking
that maybe folks here could enlighten me.

In a nutshell, I'd just like to know whether or not Punycode
encoded strings may ever validly contain either (a) leading
periods or else (b) two consecutive periods.  Would any strings
that contain either of those things be considered to be valid
Punycode encoded strings?

To be more specific and concrete about it, here is a small
example Perl program I wrote:

   ftp://ftp.tristatelogic.com/pub/punybug.pl

When *I* run this, it prints out several Invalid punycode!
errors.  (It may perhaps yield different results for other
people who have different versions of the relevant Perl
modules installed.)

Anyway, this example program is designed and intended to print
out those exact errors whenever it sees a string coming back
from the encode_punycode function that contains either a
leading period or else a pair of consecutive periods.

The short example program (at the URL above) was derived from
portions of the following test set, used for testing applications
that try to make use of the Mozilla Project's so-called Public
Suffix List:

http://mxr.mozilla.org/mozilla-central/source/netwerk/test/unit/data/test_psl.txt?raw=1

(See also: https://publicsuffix.org/)

So anyway, either the encode_punycode function supplied by the
Net::IDN::Punycode Perl module has a serious bug in it, or else
there must be something really very basic about Punycode that I
just don't understand.  I _thought_ that the whole idea of Punycode
was that random Unicode/UTF-8 strings could be encoded in a way
that wouldn't give name servers, or anything else accustomed to
dealing with traditional domain names heartburn.  Yes?  No?

Anyway, although I haven't actually tried it, I do expect that
my local copy of BIND would be rather unhappy with me if I were
to try to give it a zone file in which some of the labels either
began with periods or else contained any consecutives sequences of
periods.  Am I wrong about that?


Regards,
rfg
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users