Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-10257

AAAA record parsing fails on older versions of Windows

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.9-RC4
    • Fix Version/s: 3.0.10-RC1
    • Component/s: None
    • Labels:
      None
    • Environment:
      PHP 5.2.17
      Windows Server 2003

      Description

      It seems that in versions of Windows after 2003, the behavior of nslookup was changed so that the output of A and AAAA records are the same.

      Windows Vista/7/2008:

      > nslookup -type=AAAA www.six.heise.de. 8.8.8.8
      Server: google-public-dns-a.google.com
      Address: 8.8.8.8

      Non-authoritative answer:
      Name: www.six.heise.de
      Address: 2a02:2e0:3fe:100::6

      Windows XP/2003:

      > nslookup -type=AAAA www.six.heise.de. 8.8.8.8
      Server: google-public-dns-a.google.com
      Address: 8.8.8.8

      Non-authoritative answer:
      www.six.heise.de AAAA IPv6 address = 2a02:2e0:3fe:100::6

      Since phpbb_checkdnsrr() uses "Name:" and "Address:" to find the address line, this fails in 2003 and below. We don't actually use it to check for AAAA records ourselves, but the functionality should probably be corrected anyway since we do offer the capability.

      A possible fix would be something like replacing this: (~line 3629, /includes/functions.php)

      case 'A':
      case 'AAAA':

      with:

      case 'AAAA':
      	if (stripos($line, "$host AAAA IPv6 address") === 0)
      	{
      		return true;
      	}
      	//No break, newer versions of Windows use the A record format for AAAA records
      case 'A':

        Activity

        Hide
        bantu Andreas Fischer added a comment - - edited

        Could you please run all 12 queries from unit tests via nslookup on XP/2003 to make sure we're not missing anything else?

        Show
        bantu Andreas Fischer added a comment - - edited Could you please run all 12 queries from unit tests via nslookup on XP/2003 to make sure we're not missing anything else?
        Hide
        bantu Andreas Fischer added a comment -

        Also, there seems to be a missing break; statement after the CNAME block.

        Show
        bantu Andreas Fischer added a comment - Also, there seems to be a missing break; statement after the CNAME block.
        Hide
        Noxwizard Patrick Webster added a comment -

        Removed the " = " from the search, for consistency.

        Show
        Noxwizard Patrick Webster added a comment - Removed the " = " from the search, for consistency.
        Hide
        Noxwizard Patrick Webster added a comment -

        The tests pass on my Windows 2003 machine and the outputs of the other nslookup queries are all identical. The CNAME block should probably have a break. The results that come back just happen to not have anything that gets caught in the last cases.

        Show
        Noxwizard Patrick Webster added a comment - The tests pass on my Windows 2003 machine and the outputs of the other nslookup queries are all identical. The CNAME block should probably have a break. The results that come back just happen to not have anything that gets caught in the last cases.

          People

          • Assignee:
            bantu Andreas Fischer
            Reporter:
            Noxwizard Patrick Webster
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development