Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77426 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81094 invoked from network); 22 Sep 2014 07:09:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Sep 2014 07:09:41 -0000 Authentication-Results: pb1.pair.com header.from=florian@margaine.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=florian@margaine.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain margaine.com from 209.85.213.178 cause and error) X-PHP-List-Original-Sender: florian@margaine.com X-Host-Fingerprint: 209.85.213.178 mail-ig0-f178.google.com Received: from [209.85.213.178] ([209.85.213.178:47557] helo=mail-ig0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EA/61-08225-43BCF145 for ; Mon, 22 Sep 2014 03:09:41 -0400 Received: by mail-ig0-f178.google.com with SMTP id r10so2188873igi.17 for ; Mon, 22 Sep 2014 00:09:38 -0700 (PDT) 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; bh=IJLDJGCRcadA5HDLSi4u68Nsq5s67q0bNjhlOsiupc0=; b=kgzPrxlhcxHdbgrlBXhTybz39DThGBYX3UglP/jFE6BWSJYr40S8E7VrykQqq47V5l 3XsFAZa//RYoCyoyBTVXbssyVgeO6qYbhcwJEs/1CtQZcLTL278D/DIU8wGk7ceMBkI2 UyBd93VTgz8C3fqAszibIpny0B918nDvgou56sh26eiXqh8tWd4HqNT8IOpE8ib/YuJ+ 3iQcv91jvnYAcdLidhhjW9jkeNd2iOiy5dkUJ7/UIqqLIyESqhmIgJSb59gk5b5f/M3H VFgTCzcwdeCz3Zg/ubldY+yfDg6Rvs5Vj8TmddQUpCVkTIm79C/rA6GKrLcMQopimF6E ovxA== X-Gm-Message-State: ALoCoQlnGxlNMtQtjXRY3MKRuu07utki1tweigaHsm7SQtC3sgknaCsNhx+qQYU2LVAeOF/1EtRK MIME-Version: 1.0 X-Received: by 10.42.46.81 with SMTP id j17mr5942315icf.54.1411369777906; Mon, 22 Sep 2014 00:09:37 -0700 (PDT) Received: by 10.107.41.20 with HTTP; Mon, 22 Sep 2014 00:09:37 -0700 (PDT) X-Originating-IP: [80.215.201.238] Received: by 10.107.41.20 with HTTP; Mon, 22 Sep 2014 00:09:37 -0700 (PDT) In-Reply-To: References: Date: Mon, 22 Sep 2014 09:09:37 +0200 Message-ID: To: =?UTF-8?Q?K=C3=A9vin_Dunglas?= Cc: PHP Internals Content-Type: multipart/alternative; boundary=20cf30223cdf4262d90503a222a2 Subject: Re: [PHP-DEV] #68049 filter_var echo wrong result for a url From: florian@margaine.com (Florian Margaine) --20cf30223cdf4262d90503a222a2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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=A9cr= it : > Some browsers do. Some versions of IE are buggy when the URL include > underscores: > http://stackoverflow.com/questions/794243/internet-explorer-ignores-cooki= es-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 cannot >> 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 > --20cf30223cdf4262d90503a222a2--