[guest - Thu Dec 9 12:22:05 2004]:
Show quoted text> Semicolons aren't allowed in TXT records because of the way
> Net::DNS::RR::new_from_string parses out comments. Test case:
>
> my $rr = Net::DNS::RR->new_from_string('badtxt.krellis.us. 1234 TXT
> "something ; something else"');
> print '"',$rr->rr_rdata,'"',"\n";
>
> This code prints out "", whereas:
>
> my $rr = Net::DNS::RR->new_from_string('badtxt.krellis.us. 1234 TXT
> "something something else"');
> print '"',$rr->rr_rdata,'"',"\n";
>
> prints out "something something else" as expected. The semicolon
> should be allowed inside a double-quoted string for a TXT record.
After some investigation of the code, i found the executing part
that is direct responsible for this problem.
Net::DNS::RR lib/Net/DNS/RR.pm
row 253-254
# strip out comments
$rrstring =~ s/;.*//g;
---
With the example above, the result of this row commented gives
"→something ; something else" insted of " ".
Some traces was done before and after this row printing out $rrstring
and it will give the following:
$rrstring =~ s/;.*//g;
Gives = $rrstring = badtxt.krellis.us. 1234 TXT "something
# $rrstring =~ s/;.*//g;
Gives = $rrstring = badtxt.krellis.us. 1234 TXT "something ; something else"
Observe that this is ONLY findings during debugging of module to try
to narrow down exactly where in the code it goes wrong. Someone needs
to look into this a bit further to come up with a robust correction
that will resolve this issue permamently.
Due to upcomming "Yahoo Domainkeys", that requires semicolon as part of
the record it's crusial that this problems gets resolved ASAP.
http://antispam.yahoo.com/domainkeys
http://www.ietf.org/internet-drafts/draft-delany-domainkeys-base-01.txt
Dan Lundqvist
MRZAZ.COM
mylists@mrzaz.com
Stockholm, Sweden