Skip Menu |
 

This queue is for tickets about the Net-DNS-ZoneFile-Fast CPAN distribution.

Report information
The Basics
Id: 85099
Status: new
Priority: 0/
Queue: Net-DNS-ZoneFile-Fast

People
Owner: Nobody in particular
Requestors: tobez [...] tobez.org
Cc:
AdminCc:

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



Subject: [PATCH] NAPTR with trailing whitespace/comments is not parsed correctly
Date: Mon, 6 May 2013 22:08:06 +0200
To: bug-Net-DNS-ZoneFile-Fast [...] rt.cpan.org
From: Anton Berezin <tobez [...] tobez.org>
Download (untitled) / with headers
text/plain 1.2k
Additionally, the replacement field is nor normalized. The following patch fixes both problems: diff -u --show-c-function -ruN Net-DNS-ZoneFile-Fast-1.20/Fast.pm Net-DNS-ZoneFile-Fast/Fast.pm --- Net-DNS-ZoneFile-Fast-1.20/Fast.pm 2013-04-18 21:22:08.000000000 +0200 +++ Net-DNS-ZoneFile-Fast/Fast.pm 2013-05-06 21:59:03.000000000 +0200 @@ -1090,7 +1090,7 @@ sub parse_line }; } elsif (/\G(naptr)[ \t]+/igc) { # Parsing taken from Net::DNS::RR::NAPTR - if (!/\G(\d+) \s+ (\d+) \s+ ['"] (.*?) ['"] \s+ ['"] (.*?) ['"] \s+ ['"] (.*?) ['"] \s+ (\S+)$/xgc) { + if (!/\G(\d+) \s+ (\d+) \s+ ['"] (.*?) ['"] \s+ ['"] (.*?) ['"] \s+ ['"] (.*?) ['"] \s+ ($pat_maybefullname)$pat_skip$/xgc) { error("bad NAPTR data"); } push @zone, @@ -1108,7 +1108,7 @@ sub parse_line regexp => $5, replacement => $6, }; - $zone[ $#zone ]{replacement} =~ s/\.+$//; + $zone[-1]{replacement} .= $origin unless $zone[-1]{replacement} =~ /\.$/; } elsif (/\Gany\s+tsig.*$/igc) { # XXX ignore tsigs } else { Cheers, \Anton. -- Our society can survive even a large amount of irrational regulation. -- John McCarthy


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.