Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78903 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7295 invoked from network); 14 Nov 2014 09:45:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Nov 2014 09:45:18 -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 74.125.82.50 as permitted sender) X-PHP-List-Original-Sender: dunglas@gmail.com X-Host-Fingerprint: 74.125.82.50 mail-wg0-f50.google.com Received: from [74.125.82.50] ([74.125.82.50:39844] helo=mail-wg0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 85/07-07200-C2FC5645 for ; Fri, 14 Nov 2014 04:45:17 -0500 Received: by mail-wg0-f50.google.com with SMTP id k14so871144wgh.23 for ; Fri, 14 Nov 2014 01:45:14 -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=a0cStPJvEqgDCSJOFBlmpsmKloWWJGXIQFSNwiRx1Dk=; b=c3FIZV/kE1rMBk0Pz1NuNVLwgrK+oquIMtY7cDu0/4MbkJCrwjw85su6QdGVhlCMqC j58cjNpCCjlX+Nbe1y1BGQEEg7WQ+yReIJzUW/Hbd9Qf076ist83y8h0xnKA47Ib4i4r g6DITzzBP1/Jgb/60dhxwLFo7EUnD4lXwhy40eIXWk2YVgmXiQE7AFRWS1hdJKgT8FwY O10aaFscKBTZ0xWGAQUciEGJ/Igb8m4u7AZ4pdDc71FeAyHgXFIKqz5DbF/4zzK/5xgM GOH5FDvQPljT5m/Dm0ZlQfOC3W/MedkjzuPBAhgzuuT2z5SVyMl4M9S6++0AsPo4RL6h 7FUg== X-Received: by 10.180.91.70 with SMTP id cc6mr6136667wib.5.1415958313836; Fri, 14 Nov 2014 01:45:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.40.68 with HTTP; Fri, 14 Nov 2014 01:44:53 -0800 (PST) In-Reply-To: References: Date: Fri, 14 Nov 2014 10:44:53 +0100 Message-ID: To: Yasuo Ohgaki Cc: Sanford Whiteman , Sean Coates , Andrey Andreev , Daniel Ribeiro , PHP Internals Content-Type: multipart/alternative; boundary=f46d0438edd75025820507ce7c81 Subject: Re: [PHP-DEV] Better RFC conformance for FILTER_VALIDATE_URL From: dunglas@gmail.com (=?UTF-8?Q?K=C3=A9vin_Dunglas?=) --f46d0438edd75025820507ce7c81 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I've just pushed some changes in the PR. FILTER_VALIDATE_DOMAIN now checks characters validity only if FILTER_FLAG_HOSTNAME is set. I've also rebased and fixed some issues detailed on GitHub. Yasuo, it's not trivial to use this new validator in FILTER_VALIDATE_EMAIL. Its current implementation use a big regex that doesn't extract the domain part. Anyway, having a good RFC compliant email validator cannot be done with a regex. See https://github.com/egulias/EmailValidator for instance. I think it's a work for another PR. I'll keep the email validator in it's current state for now. Do you guys are OK to get the current PR merged? 2014-11-12 19:10 GMT+01:00 K=C3=A9vin Dunglas : > Hi Yasuo, > > I've not changed (and even read) the email validator. I'll take a look at > it. > > 2014-11-12 10:41 GMT+01:00 Yasuo Ohgaki : > >> Hi Kevin, >> >> On Wed, Nov 12, 2014 at 4:09 PM, K=C3=A9vin Dunglas = wrote: >> >>> I'll change my PR according to the RFC I've quoted earlier: >>> - check for valid characters (excluding underscore) only when >>> FILTER_FLAG_HOSTNAME is set >>> - allow any character but check lengths by default >>> - use FILTER_FLAG_HOSTNAME to validate URLs >>> >>> What do you think about that? >>> >> >> I haven't read diff closely, but it seems ok to me. >> How email domain is checked? I cannot see changes for it from the diff. >> >> Validating host correctly is difficult, I would like to have your PR. >> >> Regards, >> >> -- >> Yasuo Ohgaki >> yohgaki@ohgaki.net >> > > > > -- > K=C3=A9vin Dunglas > > http://dunglas.fr > --=20 K=C3=A9vin Dunglas Consultant et d=C3=A9veloppeur freelance http://dunglas.fr T=C3=A9l. : 06 60 91 20 20 --f46d0438edd75025820507ce7c81--