Skip to content

Commit

Permalink
- fixed an issue when looking up . or com., when using the strict_que…
Browse files Browse the repository at this point in the history
…ry_mode flag.
  • Loading branch information
mikepultz committed Feb 12, 2017
1 parent 35e8beb commit 24c84c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Net/DNS2/Resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@ public function query($name, $type = 'A', $class = 'IN')
//
foreach ($response->answer as $index => $object) {

if ( (strcasecmp($object->name, $name) == 0)
&& ($object->type == $type)
&& ($object->class == $class)
if ( (strcasecmp(trim($object->name, '.'), trim($packet->question[0]->qname, '.')) == 0)
&& ($object->type == $packet->question[0]->qtype)
&& ($object->class == $packet->question[0]->qclass)
) {
$found = true;
break;
Expand Down
1 change: 1 addition & 0 deletions package.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
$pkg->setReleaseStability('stable');
$pkg->setAPIStability('stable');
$pkg->setNotes(
"- fixed an issue when looking up . or com., when using the strict_query_mode flag.\n" .
"- fixed a bug in the caching logic where I was loading the content more than once per instance, when really I only need to do it once.\n" .
"- changed the Net_DNS2::sock array to use the SOCK_DGRAM and SOCK_STREAM defines, rather than the strings 'tcp' or 'udp'.\n" .
"- fixed a bug in the Net_DNS2_Header and Net_DNS2_Question classes, where I was using the wrong bit-shift operators when parsing some of the values. This only became apparent when somebody was trying to use the CAA class (id 257); it was causing this to roll over to the next 8 bit value, and returning 1 (RR A) instead of the CAA class.\n" .
Expand Down

0 comments on commit 24c84c9

Please sign in to comment.