php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78008 dns_check_record() always return true on Alpine
Submitted: 2019-05-13 14:57 UTC Modified: 2019-11-07 13:14 UTC
Votes:6
Avg. Score:4.0 ± 0.8
Reproduced:6 of 6 (100.0%)
Same Version:2 (33.3%)
Same OS:6 (100.0%)
From: a dot suharevs at dyninno dot lv Assigned:
Status: Open Package: *Network Functions
PHP Version: 7.3.11 OS: Alpine
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2019-05-13 14:57 UTC] a dot suharevs at dyninno dot lv
Description:
------------
dns_check_record() always return true on systems based on MuslC libc, due to incorrect usage of Musl libc res_search() function in php_dns_search().

Here is the issue on alpine bugtracker: https://bugs.alpinelinux.org/issues/7392


Test script:
---------------
<?php
var_dump(dns_check_record('asdasda123123.123131'));

Expected result:
----------------
bool(false)

Actual result:
--------------
bool(true)

Patches

dns_check_record_patch_light (last revision 2019-05-13 16:13 UTC by a dot suharevs at dyninno dot lv)
dns_check_record_patch (last revision 2019-05-13 14:58 UTC by a dot suharevs at dyninno dot lv)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-05-13 15:25 UTC] danack@php.net
It's possible other people can read it, but to me that patch appears to be touching lots of lines that don't appear to be changed. e.g.

-#ifndef MAXPACKET
+#ifndef MAXPACKET

Which makes seeing the actual change quite hard. 

Is it possible for you to regenerate the patch as a smaller one?
 [2019-05-13 16:17 UTC] a dot suharevs at dyninno dot lv
Sure, uploaded new patch.
 [2019-05-20 12:57 UTC] a dot suharevs at dyninno dot lv
-PHP Version: 7.2.18 +PHP Version: 7.3.5
 [2019-05-20 12:57 UTC] a dot suharevs at dyninno dot lv
updated version
 [2019-06-03 09:47 UTC] a dot suharevs at dyninno dot lv
danack@php.net Any news regarding this fix?
 [2019-08-01 10:27 UTC] a dot suharevs at dyninno dot lv
-PHP Version: 7.3.5 +PHP Version: 7.4
 [2019-08-01 10:27 UTC] a dot suharevs at dyninno dot lv
Latest version of PHP have same problem
 [2019-11-07 13:14 UTC] nikic@php.net
-PHP Version: 7.4 +PHP Version: 7.3.11
 [2020-02-19 12:15 UTC] albert at noustique dot com
Would be great to have this merged, checkdnsrr() is not usable in Alpine right now. Thanks a lot!
 [2020-03-12 13:30 UTC] albert at noustique dot com
It should be noted that the return value of getmxrr() is also affected by this bug and not fixed by the patch.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Mar 29 22:01:26 2020 UTC