Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78782 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75777 invoked from network); 6 Nov 2014 06:20:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Nov 2014 06:20:17 -0000 Authentication-Results: pb1.pair.com header.from=dunglas@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dunglas@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.179 as permitted sender) X-PHP-List-Original-Sender: dunglas@gmail.com X-Host-Fingerprint: 209.85.212.179 mail-wi0-f179.google.com Received: from [209.85.212.179] ([209.85.212.179:60357] helo=mail-wi0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3B/48-28384-E131B545 for ; Thu, 06 Nov 2014 01:20:15 -0500 Received: by mail-wi0-f179.google.com with SMTP id h11so482611wiw.0 for ; Wed, 05 Nov 2014 22:20:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=u44Q5LkXYryl9AvARZHn0+1FaiLKYuCc9G7/sZy1nJA=; b=I/CmYbPDAlJgdMVadVOLU6febroT0TY7H8qRBb+1bX0ozP2Jw/SACvmgIYUdIjAJ2s 2MthmJZ3SERiJznQlZQjibZBSU9dmR8bxjPbSdZMT4EjOnYlPKRi3NGo7D8OXoKa+4GY T32E75m78qHWISjnayAukD8/q3t8Uc//LLKXD4Z9xYaaogdhtzMjTPe0FkBlKHSKhh9g r53aGCcyqVdoU4W//KMbUAYYDC832SpvE7F+NWN2bAOolR/XuQFkFIamv9TUFlPDrGmn XI9Klec4PRdF3dbaqH9RMeQFWu4NftpR1rQolXCFOaXEqxz3adCthU3moSJeKR55E3MX Dp0w== X-Received: by 10.194.61.208 with SMTP id s16mr2536958wjr.104.1415254810743; Wed, 05 Nov 2014 22:20:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.35.73 with HTTP; Wed, 5 Nov 2014 22:19:50 -0800 (PST) In-Reply-To: References: Date: Thu, 6 Nov 2014 07:19:50 +0100 Message-ID: To: Andrey Andreev Cc: Daniel Ribeiro , PHP Internals Content-Type: multipart/alternative; boundary=047d7b86d3e642d9c305072ab07b Subject: Re: [PHP-DEV] Better RFC conformance for FILTER_VALIDATE_URL From: dunglas@gmail.com (=?UTF-8?Q?K=C3=A9vin_Dunglas?=) --047d7b86d3e642d9c305072ab07b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Andrey, Sorry but I think you're wrong. Domain !=3D hostname. Underscore are allowe= d 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 underscore 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 SCTP 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 2014-11-06 0:32 GMT+01:00 Andrey Andreev : > Hi, > > On Wed, Nov 5, 2014 at 11:57 PM, K=C3=A9vin Dunglas w= rote: > > > > - Added a new FILTER_VALIDATE_DOMAIN filter validating domain names > > - Added a FILTER_FLAG_HOSTNAME flag to allow checking hostnames (_ are > > forbidden in hostname but not in domains) > > This doesn't make any sense. A domain *is* a hostname and underscores > are forbidden. > > Cheers, > Andrey. > --=20 K=C3=A9vin Dunglas Consultant et d=C3=A9veloppeur freelance http://dunglas.fr T=C3=A9l. : 06 60 91 20 20 --047d7b86d3e642d9c305072ab07b--