Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77348 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26475 invoked from network); 19 Sep 2014 17:54:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2014 17:54:55 -0000 Authentication-Results: pb1.pair.com header.from=adam@adamharvey.name; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=adam@adamharvey.name; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain adamharvey.name designates 209.85.223.172 as permitted sender) X-PHP-List-Original-Sender: adam@adamharvey.name X-Host-Fingerprint: 209.85.223.172 mail-ie0-f172.google.com Received: from [209.85.223.172] ([209.85.223.172:38746] helo=mail-ie0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4F/42-13213-DED6C145 for ; Fri, 19 Sep 2014 13:54:54 -0400 Received: by mail-ie0-f172.google.com with SMTP id rp18so2054849iec.3 for ; Fri, 19 Sep 2014 10:54:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adamharvey.name; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=ZpnYdyZzVghbeBCDUG2rAaA0YsgGAr0QmFaV0VRT/yw=; b=vkoEqSt6r2QyyUS0+c0NoKOw0tkHWeqUYWdv+hK6Ll+Vz/PdlJmn+dnouJXWp9gIh8 jCnDaXn3iyPXl+QbO3iMRPyddXjqj/60hSm9BNW6W1wnUvsev1sUIm/EwXgIVX6YxASV OqRhT5vMGBrmKCdQ7ZK8gEnMsk2O+NZVLxxew= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=ZpnYdyZzVghbeBCDUG2rAaA0YsgGAr0QmFaV0VRT/yw=; b=E9JE8OJuzAd+IdLLky0mB37xZ3LqQXcIuV2J38ryk/Czr+gDP5cKPxEWQUM5FGrrut 8JMtcU7+tf9UQ2BViXr3PT6Xe+j+Id+KIP9SpCNi8C/aU5MZANArWyNiUHmmhA3rkndo 2QZGInIhrjLv5BSM3EDvuergJ2PdHf2BCyl9G2KSp6S9Z1WJgWcWqaUfn0RVWfaNO06W wXbPIB4CkbvlIr4X53G6//DFKUgqxt85S9qI466Xe5Jm+WSPPqtQQuqS8GiPJ9mD5k2Q t7IgV/4jldFBsqFEjqi97K6KdsOLwpwj0qLVHrE+TZCGKYHWlRl5qDxIqXc5O5vU6Ycv aJ5A== X-Gm-Message-State: ALoCoQk2a2Zln7wN8Ko3gnW5+VC4HpnruiHyvSrxBzqpi/CKDMK5UlbxOrE1pXXsjGEWmgg1MtPv X-Received: by 10.42.216.17 with SMTP id hg17mr2561472icb.69.1411149290866; Fri, 19 Sep 2014 10:54:50 -0700 (PDT) MIME-Version: 1.0 Sender: adam@adamharvey.name Received: by 10.43.70.143 with HTTP; Fri, 19 Sep 2014 10:54:30 -0700 (PDT) In-Reply-To: References: Date: Fri, 19 Sep 2014 10:54:30 -0700 X-Google-Sender-Auth: dmUAV9eOenek2fUrEJe8vMt0tkI Message-ID: To: Kris Craig Cc: PHP internals list Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Why does checkdnsrr() default to MX?? From: aharvey@php.net (Adam Harvey) On 19 September 2014 10:51, Kris Craig wrote: > On Fri, Sep 19, 2014 at 10:24 AM, Adam Harvey wrote: >> As an alternative, could we just make the type argument mandatory in >> PHP 7 and start issuing E_DEPRECATED warnings if it's omitted in 5.6 >> or 5.7? > > I like both ideas. Adam's approach would be more inconvenient for > developers, but it would also be less of a BC issue since merely changing > the default could cause some existing code to fail silently as opposed to > generating an error. On the other hand, I can't think of any such use ca= se > in which checking all DNS entries instead of just MX would cause any scri= pts > to break. The only possible scenario I can think of would be if they're > using dnsrr() to check if an MX record exists and hit a host that has an = A > record but not MX. That would cause it to return TRUE when they're > expecting FALSE. I'm not a huge fan of silently making it ANY for the reason Sanford explained elsethread =E2=80=94 it's a potential vector for amplification attacks. I also don't think it's unreasonable to expect developers to know what type of record they're interested in. :) > I'll draft an RFC when I get a chance and include both options in it. Thanks! Adam