Bug #68081 [Opn]: checkdnsrr( 'example.com' ) returns `true` when no MX, only CNAME

From: Date: Wed, 11 May 2022 15:04:39 +0000
Subject: Bug #68081 [Opn]: checkdnsrr( 'example.com' ) returns `true` when no MX, only CNAME
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-241461@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68081&edit=1 ID: 68081 Updated by: cmb@php.net Reported by: figureonecpr at gmail dot com Summary: checkdnsrr( 'example.com' ) returns true when no MX, only CNAME Status: Open Type: Bug Package: Network related Operating System: Linux Phoenix 2.6.32 PHP Version: master-Git-2014-09-23 (snap) Block user comment: N Private report: N New Comment: Bug fixes should target the lowest branch which is actively supported (currently PHP-8.0). If there are BC concerns, then master should be targeted. See also <https://github.com/php/php-src/blob/master/CONTRIBUTING.md>. Previous Comments: ------------------------------------------------------------------------ [2022-05-11 14:29:20] cschneid@php.net If I understand correctly you want to fix it for 7.4 but AFAIK such fixes should be done on master and then backported by the release managers. Please correct me if I'm wrong :-) ------------------------------------------------------------------------ [2022-05-11 00:25:08] jeff at systasis dot co Hi - I think this can be resolved by checking the actual answer instead of the count of returned answers. I'm assuming that rectype gets properly initialized when NULL by the parameter processing logic. If you agree, I'll fork 7.4 based on 3v4l.org/BoGri/rfc#output ------------------------------------------------------------------------ [2014-09-23 18:44:54] figureonecpr at gmail dot com Note the dn does the same thing with other RRtypes: treats the existence of a CNAME as a positive result. This bug cripples the function into unusability. The example I also posted to the mailing list is that checkdnsrr( 'www.php.net', 'SRV' ) returns true. And you do not have an SRV record (as a Windows guy I would've been surprised if you did!). ------------------------------------------------------------------------ [2014-09-23 07:19:16] figureonecpr at gmail dot com You can use phpbug68081.trueklyn.com at present. ------------------------------------------------------------------------ [2014-09-23 04:56:15] kriscraig@php.net Could you include the actual hostname you used? That'll make it easier for me to repro. Thanks! --Kris ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=68081 -- Edit this bug report at https://bugs.php.net/bug.php?id=68081&edit=1

« previous php.bugs (#241461) next »