php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75909 dns_get_record does not support CAA record type on Windows
Submitted: 2018-02-02 22:07 UTC Modified: 2018-02-27 03:04 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: philip at kerzap dot com Assigned:
Status: Wont fix Package: Network related
PHP Version: 7.2.2 OS: Windows
Private report: No CVE-ID: None
 [2018-02-02 22:07 UTC] philip at kerzap dot com
Description:
------------
Support for this record was added to dns_get_record in 7.0.16, but Windows uses a separate implementation of dns_get_record (defined in dns_win32.c) that did not get updated.

The DNS_CAA constant is defined on Windows.

Original bug: https://bugs.php.net/bug.php?id=73850
Original commit: https://github.com/php/php-src/commit/280e9cb28d07a69e56ebcde4c368f3053298abe3

Test script:
---------------
var_dump(dns_get_record('google.com', DNS_CAA));

Expected result:
----------------
array(1) {
  [0]=>
  array(7) {
    ["host"]=>
    string(10) "google.com"
    ["class"]=>
    string(2) "IN"
    ["ttl"]=>
    int(60)
    ["type"]=>
    string(3) "CAA"
    ["flags"]=>
    int(0)
    ["tag"]=>
    string(5) "issue"
    ["value"]=>
    string(8) "pki.goog"
  }
}

Actual result:
--------------
PHP Warning: dns_get_record(): Type '8192' not supported in php shell code on line 1
bool(false)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-02-12 12:02 UTC] ab@php.net
Thanks for reporting. The current Windows API doesn't seem to provide a way to query these record types. One can query an authority of a host, but not the autority record itself. Until I've overseen something, there's no way to map this functionality currently :(

Thanks.
 [2018-02-13 04:05 UTC] mattficken@php.net
Windows doesn't seem to support CAA at all, surprisingly.

For example, `nslookup`:
C:\php-sdk>nslookup
Default Server:  google-public-dns-a.google.com
Address:  8.8.8.8

> set q=CAA
unknown query type: CAA
> set q=TXT
>

Also, see: https://social.technet.microsoft.com/Forums/en-US/2399c372-89ad-4254-a7a9-7ab55af7a486/do-any-versions-of-dns-server-support-certification-authority-authorization-records?forum=winserveripamdhcpdns

Therefore, PHP could only do it with a userland DNS library. Should be a Wont fix :(   Thanks for pointing this out though :)
 [2018-02-27 03:04 UTC] mattficken@php.net
-Status: Open +Status: Wont fix
 [2018-02-27 03:04 UTC] mattficken@php.net
Windows DNS impl doesn't support CAA record type. This is a behavior difference and is a won't fix
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 23:01:29 2024 UTC