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:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (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
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Nov 14 06:01:35 2019 UTC