Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77317 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7325 invoked from network); 18 Sep 2014 21:20:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Sep 2014 21:20:54 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.52 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.52 mail-wg0-f52.google.com Received: from [74.125.82.52] ([74.125.82.52:64305] helo=mail-wg0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 72/00-07171-5BC4B145 for ; Thu, 18 Sep 2014 17:20:54 -0400 Received: by mail-wg0-f52.google.com with SMTP id x13so1509850wgg.23 for ; Thu, 18 Sep 2014 14:20:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type:subject:from:date:to :message-id; bh=EESr5yH+muwNqyhs0vZzmkjzJy7PoN7G4KuWGYShW9E=; b=GNAaENlpRW8T5dgyL184y45LSHnJytysFpN9cOTecb0rv+YsEjQO4yrD0oFn1yVhrq OSp3MkT8aDbycahXZodNV/3ygaMmijzcE9ivf0U5wGCT8CPDkz1V2OpYD90l9aGiJ0Bs b1i7nHR5hAps1ymqx+vqT5Q+05gnRjhDj/u6CObCMbfwwkzVeFbx8g9rXqS8Qra/+O7u bHxOCYetYB/1iXXQtf0dr2sBMLZTOt27hIih78AH1ZYJwCUp93SL5KH5xNRuNEFdepNc K2Jvx/yF8LE1+pyTdo/nuRSRL59fh3HgW79Pr3zbPbReEo4YYf3vFfJf1O6/8bfEXAvt MvqQ== X-Received: by 10.194.57.105 with SMTP id h9mr4586249wjq.116.1411075250855; Thu, 18 Sep 2014 14:20:50 -0700 (PDT) Received: from [192.168.0.3] (cpc68956-brig15-2-0-cust215.3-3.cable.virginm.net. [82.6.24.216]) by mx.google.com with ESMTPSA id lu12sm9084wic.4.2014.09.18.14.20.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Sep 2014 14:20:50 -0700 (PDT) User-Agent: K-9 Mail for Android In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Date: Thu, 18 Sep 2014 22:19:46 +0100 To: PHP Internals Message-ID: <4bf4c18f-173d-45c9-a7e8-344f5ebcb47f@email.android.com> Subject: Re: [PHP-DEV] Why does checkdnsrr() default to MX?? From: rowan.collins@gmail.com (Rowan Collins) On 18 September 2014 21:31:33 GMT+01:00, Sanford Whiteman wrote: >ANY (*) requests are key to many DNS amplification attacks and may >fail, >even if the RR you want exists when individually requested. Such >requests >should be discouraged by clients, IMO. It's disappointing that PHP's >dns_get_record() defaults to ANY. > >But more to the point, what is the client-side utility? You are >basically >flooding yourself if you make such requests -- what exactly are you >going >to do with the TXT records, NS records, the SOAs, the unknown types? >This >is just a ton of extraneous data, even if the overall payload is small. > >Maybe if you're building a PHP app whose sole purpose is to >troubleshoot >DNS. But if so I would sooner fork `dig`, since most likely you are >trying >to show people the results that a non-PHP app would see, so better to >avoid >any PHP bugs/specialness and miss any DNS features (such as new RR >types >and new DNS extensions). > >I don't think there's anything particularly askew in MX being the >default >for checkdnsrr() if you think of it as a cut-down generalization of >getdnsmx(). Still I can't remember the last time my PHP apps cared >only >about whether an RR existed, not its value (our mail server cares about >that of course when checking blacklists, and we care when we're >troubleshooting... but not within PHP). And I've *never *wanted to get >a >true/false *if there is an RR of any type, *as opposed to a true/false >if >the domain exists at all in the public DNS. Can you explain the use >case? > >-- Sandy Hi, I think you might need to take a deep breath, read through the mailing list guidelines [ http://git.php.net/?p=php-src.git;a=blob_plain;f=README.MAILINGLIST_RULES;hb=HEAD], and start again. Your post mentions three different functions, which have different purposes, and different default parameters, and demands that we provide a use case for something (I'm not clear what) because you've never needed it. I would say it is up to you to put forward a considered case for a change, not for everyone else to justify the status quo. What is it you are actually proposing or requesting here? To remove the ability of these functions to query ANY? To remove the default parameter so that people don't use ANY accidentally? Or to change the default value to something different? Bear in mind that any change needs to take into account compatibility with existing code, so removing or changing a default parameter requires a strong justification to offset the problems it may cause users. I hope this message doesn't sound too negative, and look forward to clarification of your thoughts. Regards, -- Rowan Collins [IMSoP]