|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2014-09-23 03:52 UTC] figureonecpr at gmail dot com
Description: ------------ Per http://php.net/manual/en/function.checkdnsrr.php, checkdnsrr() defaults to an MX record query when the second argument is not supplied. Regardless of SMTP's implicit MX logic, this function is supposed to return `false` if $host does not have at least one *explicit* MX in the DNS. However, if the supplied hostname simply has a CNAME record (a good CNAME, one that can be dereferenced to an extant canonical hostname) the function returns `true`. The bug is seen regardless of whether the canonical hostname itself has an MX record. For example, if you have somehost.example.com CNAME --> example.com A and do checkdnsrr( 'somehost.example.com' ) you will get `true`. But if you go straight to the canonical A record and do checkdnsrr( 'example.com' ) you will get `false`. Test script: --------------- // where cname.example.com exists is a CNAME in the DNS pointing to an extant canonical hostname var_dump( checkdnsrr( 'cname.example.com' ) ); Expected result: ---------------- boolean(false) Actual result: -------------- boolean(true) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 10:00:01 2025 UTC |
You can use phpbug68081.trueklyn.com at present.