Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77429 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85849 invoked from network); 22 Sep 2014 07:20:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Sep 2014 07:20:50 -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.215.51 as permitted sender) X-PHP-List-Original-Sender: dunglas@gmail.com X-Host-Fingerprint: 209.85.215.51 mail-la0-f51.google.com Received: from [209.85.215.51] ([209.85.215.51:34291] helo=mail-la0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E8/72-08225-1DDCF145 for ; Mon, 22 Sep 2014 03:20:50 -0400 Received: by mail-la0-f51.google.com with SMTP id gi9so6163794lab.10 for ; Mon, 22 Sep 2014 00:20:47 -0700 (PDT) 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=CcNjNimEuU3R8rEWHA2wVjjZGMG4+BFMYY/xfjDpr/8=; b=Zhp8evSaPDA1MOdQfGnggHCgAehAKwotZxFoHx2KL95OPOEKoac0Tb13KZB4jdoFn6 ZuTlX9r3LXW+mhwKpGT6vyUclE5Swk/MHJdIVQfwb5bLIoFlYmZhJrmdTj500Id/rekQ biFw7FZDEUsLEwh4eeM8TbclAeHN4wH5t+6E39FLwhoOsI+Wm0sT+KVuONZTKcmiDnj/ BlwNwC8kbJ3TbU4zfnzuc/4UYnpRY3h3YFGUI0XOVq61UGb6HeZUx1iVfx037DHsVu+3 Jki0j7FBj4NhQLBsk2vdcZwP+uOheERaS7cAJLidG6cu7hJOGobqfGOHXhFTgEoiiB1B xxeQ== X-Received: by 10.112.141.7 with SMTP id rk7mr846706lbb.83.1411370446928; Mon, 22 Sep 2014 00:20:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.114.161.164 with HTTP; Mon, 22 Sep 2014 00:20:26 -0700 (PDT) In-Reply-To: References: Date: Mon, 22 Sep 2014 09:20:26 +0200 Message-ID: To: Florian Margaine Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a11c37e1a22bfed0503a24a32 Subject: Re: [PHP-DEV] #68049 filter_var echo wrong result for a url From: dunglas@gmail.com (=?UTF-8?Q?K=C3=A9vin_Dunglas?=) --001a11c37e1a22bfed0503a24a32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I've recently proposed a refactoring of FILTER_VALIDATE_URL: https://github.com/php/php-src/pull/826 I can easily add the support of this new flag is everyone agree. 2014-09-22 9:09 GMT+02:00 Florian Margaine : > Oh, IE. *sigh* > > Adding a new flag sounds like a good idea indeed, > `FILTER_VALIDATE_UNCOMPLIANT_URL` sounds good enough? > > I guess it should accept underscores and domain names starting with > numbers too. > > Regards, > > *Florian Margaine* > > P.S: sorry Kevin for the double mail. > Le 22 sept. 2014 09:03, "K=C3=A9vin Dunglas" a =C3=A9= crit : > >> Some browsers do. Some versions of IE are buggy when the URL include >> underscores: >> http://stackoverflow.com/questions/794243/internet-explorer-ignores-cook= ies-on-some-domains-cannot-read-or-set-cookies >> >> >> I think that filter_var must follow the RFC by default. Maybe can we add >> a flag to allow malformed URL in use in the wild? >> >> >> >> 2014-09-21 10:42 GMT+02:00 Florian Margaine : >> >>> Hi, >>> >>> According to https://bugs.php.net/bug.php?id=3D51192 , valid URLs canno= t >>> contain underscores. >>> >>> The following bug was reported a couple days ago: >>> https://bugs.php.net/bug.php?id=3D68049 >>> >>> The thing is, browsers *do* accept the underscore in URLs. Should the >>> rfc3986 be >>> respected, or >>> should PHP be lenient like browsers and accept more? >>> >>> Regards, >>> >>> *Florian Margaine* >>> >> >> >> >> -- >> K=C3=A9vin Dunglas >> Consultant et d=C3=A9veloppeur freelance >> >> http://dunglas.fr >> T=C3=A9l. : 06 60 91 20 20 >> > --=20 K=C3=A9vin Dunglas Consultant et d=C3=A9veloppeur freelance http://dunglas.fr T=C3=A9l. : 06 60 91 20 20 --001a11c37e1a22bfed0503a24a32--