ID:               42855
 Updated by:       [EMAIL PROTECTED]
 Reported By:      misc at e2007 dot cynergi dot com
-Status:           Open
+Status:           Assigned
 Bug Type:         Network related
 Operating System: RHEL4
 PHP Version:      5.2.4
-Assigned To:      
+Assigned To:      pollita
 New Comment:

Sara, please take a look, seems like this cryptic piece of code (so
messy) uses wrong length to get the piece of data here..


Previous Comments:
------------------------------------------------------------------------

[2007-10-04 13:24:20] misc at e2007 dot cynergi dot com

I'm tired... 3rd paragraph in the "description" should have read: "The
following code examples where compiled when under Windows the command
... returned:", and the "expected result" string length should be
greater than 127, of course.

------------------------------------------------------------------------

[2007-10-04 13:12:33] misc at e2007 dot cynergi dot com

Description:
------------
dns_get_record() doesn't return all text from TXT record.

RFC 1035 states that TXT record values can't have "compression", but
can have multiple strings for the same DNS record. Although uncommon,
such long TXT strings actualy exist to make publicly available public
key data for DomainKeys e-mail protocols (used by Yahoo! and Gmail).

The following code examples where compiled when under Windows, the
command "nslookup -type=TXT bravo._domainkey.yahoogroups.co.uk"
returned:

(...)
Non-authoritative answer:
bravo._domainkey.yahoogroups.co.uk      text =

        "k=rsa;
p=MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhAKt1OprXeH+okFnh8XxMeVV9iYAbhIOMq3ODHpcBm7JSl3Orusqv53BIn55a0JaP1iqbIWu5j3TVIpqbG7MHZU"
        "KJQrqcmVSvG7oT3r7Fwo6aCHMMuL+IZdEpbb9ZU8xomQIDAP//"


Reproduce code:
---------------
$x = dns_get_record("bravo._domainkey.yahoogroups.co.uk", DNS_TXT);
var_dump($x);


Expected result:
----------------
array(1) {
  [0]=>
  array(5) {
    ["host"]=>
    string(34) "bravo._domainkey.yahoogroups.co.uk"
    ["type"]=>
    string(3) "TXT"
    ["txt"]=>
    string(127) "k=rsa;
p=MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhAKt1OprXeH+okFnh8XxMeVV9iYAbhIOMq3ODHpcBm7JSl3Orusqv53BIn55a0JaP1iqbIWu5j3TVIpqbG7MHZUKJQrqcmVSvG7oT3r7Fwo6aCHMMuL+IZdEpbb9ZU8xomQIDAP//"
    ["class"]=>
    string(2) "IN"
    ["ttl"]=>
    int(17428)
  }
}


Actual result:
--------------
array(1) {
  [0]=>
  array(5) {
    ["host"]=>
    string(34) "bravo._domainkey.yahoogroups.co.uk"
    ["type"]=>
    string(3) "TXT"
    ["txt"]=>
    string(127) "k=rsa;
p=MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhAKt1OprXeH+okFnh8XxMeVV9iYAbhIOMq3ODHpcBm7JSl3Orusqv53BIn55a0JaP1iqbIWu5j3TVIpqbG7MHZU"
    ["class"]=>
    string(2) "IN"
    ["ttl"]=>
    int(17428)
  }
}



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=42855&edit=1

Reply via email to