Skip Menu |

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

Report information
The Basics
Id: 72013
Status: resolved
Priority: 0/
Queue: Net-DNS

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

Bug Information
Severity: Normal
Broken in:
  • 0.66
  • 0.66_01
  • 0.66_02
Fixed in: (no value)



Subject: Incorrect regex in presentation2wire
I noticed this in presentation2wire when I was working on it, but didn't think anything of it: #backslash found if ($presentation =~ /\G(\d\d\d)/gc) { $wire.=pack("C",$1); } elsif ($presentation =~ /\Gx([0..9a..fA..F][0..9a..fA..F])/gc){ $wire.=pack("H*",$1); } elsif ($presentation =~ /\G([@().\\])/gc){ $wire .= $1; } Those [0..9a..fA..F] should be [0-9a-fA-F]. Right now they're matching literal 0, 9, a, f, A, F and ., not the ranges that they should be matching. I'm hesitant to just provide a fix for this code however, because that could change how it interacts with people's data. I'm guessing there's no test coverage for these behaviors either or we would have seen failures. This was broken in the original code before I modified it as well, but I didn't trace it back to see what its intended purpose was. -- Matthew Horsfall (alh) http://dyn.com
Hi Matthew, Hexadecimal escapes are *not* mentioned in RFC4343, http://tools.ietf.org/html/rfc4343#section-2.1 , and I am not aware of software allowing it, but I will ask around about that. If there is no software supporting hexadecimal escapes in labels, than this would be a good time to get rid our broken support for it as well. Otherwise we HAVE to fix it, because now it definitely does not make sense and would only be confusing. Thanks for noticing and reporting! -- Willem
There is actually a test in t/11-escapedchars.t that uses hexadecimal escaping, but unfortunately it uses the working code \xa9 :(.
Okay, According to the experts I consulted, it is not used anywhere (except in Net::DNS). I have removed hex escaping from the code and the unit test. Thanks again, -- Willem
On Mon Oct 31 10:14:25 2011, WILLEM wrote: Show quoted text
> Okay, According to the experts I consulted, it is not used anywhere > (except in Net::DNS). I have removed hex escaping from the code and the > unit test. > Thanks again, > -- Willem
Awesome. Thank you. And RE: that one test - heheh, hate when that happens :) -- Matthew Horsfall (alh) http://dyn.com