Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78814 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40724 invoked from network); 6 Nov 2014 12:55:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Nov 2014 12:55:11 -0000 Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.214.179 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.214.179 mail-ob0-f179.google.com Received: from [209.85.214.179] ([209.85.214.179:41155] helo=mail-ob0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/A4-28384-CAF6B545 for ; Thu, 06 Nov 2014 07:55:11 -0500 Received: by mail-ob0-f179.google.com with SMTP id m8so751191obr.38 for ; Thu, 06 Nov 2014 04:55:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devilix.net; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=20JJuQQrg75/YszV8kLDK936TM1jRctt25ZZwlPlcxo=; b=CoXuqTtwHFOizKpkUxIHN3mEnUR5IlBNKDNVenjiKz9pSkZ8HYo+kk04+TClQK+ldp CPgng+rU98LYCQQeyD20EAO9P/kmo1jCvysBZAXdkrMmEpPEZKNYD4Ofw6ia/BMpqo+c Tc9L9KbDkvA2230UCfj1lZTkZhGFTFr+UJB6Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=20JJuQQrg75/YszV8kLDK936TM1jRctt25ZZwlPlcxo=; b=Vs/JbZmNxz2UuvhCHoj8pNoLzy4Cskt0J8IZIlRmJGAi328+y2yDEnQudDnhkGpjaq I3f/8A9/ShJByXt0b3Vm6x2JRNxyc0z/bGjIUevR4V0frBgcQsrVSTdMxgs9BZ8YAAOo 6ZO2TSRbsyJl7fb67U4MX+Xggdny+lU7Yp+ZDKVpqHDLuB6IpdrlIPLKroDfKgruGzFR 1uBLrFHKKnu+Miiz+RnWpQ+QJE9E538S0tfJwlXS4xPArrmPXIMi3nIVtchRiAODWZhd HuJ6KHIZcyCJLxQ/0zjgKcOfECQVyp4jVMx3/fNbIXhZweNaR0DXUVPmIziC9fQ8zMcF X0cw== X-Gm-Message-State: ALoCoQkiU/Wv43k30N6P1NJkJ102dv3b3fi1VlcyOwHFkDsff73K0gHMamiL6PERcmN8MbjG9RGu MIME-Version: 1.0 X-Received: by 10.60.148.194 with SMTP id tu2mr2008823oeb.56.1415278506419; Thu, 06 Nov 2014 04:55:06 -0800 (PST) Received: by 10.202.75.148 with HTTP; Thu, 6 Nov 2014 04:55:06 -0800 (PST) In-Reply-To: References: Date: Thu, 6 Nov 2014 14:55:06 +0200 Message-ID: To: =?UTF-8?Q?K=C3=A9vin_Dunglas?= Cc: Daniel Ribeiro , PHP Internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Better RFC conformance for FILTER_VALIDATE_URL From: narf@devilix.net (Andrey Andreev) Hi, On Thu, Nov 6, 2014 at 8:19 AM, K=C3=A9vin Dunglas wrot= e: > Hi Andrey, > > Sorry but I think you're wrong. Domain !=3D hostname. Underscore are allo= wed > in domains (RFC 2181) but not in hostnames (RFC 1123 and next). To quote > Wikipedia: > > "While a hostname may not contain other characters, such as the underscor= e > character (_), other DNS names may contain the underscore. Systems such > asDomainKeys and service records use the underscore as a means to assure > that their special character is not confused with hostnames. For > example,_http._sctp.www.example.com specifies a service pointer for an SC= TP > capable webserver host (www) in the domain example.com." > http://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names > > You can also see this StackOverflow answer > http://stackoverflow.com/a/2183140/1352334 I agree to an extent, but that is highly contextual. Who said that 'domain' =3D=3D=3D 'DNS record' (which is a very broad term anyway)? And IF we assume this, why do you need FILTER_VALIDATE_DOMAIN for it if it's only going to check length? Cheers, Andrey.