Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77326 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40355 invoked from network); 19 Sep 2014 05:24:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2014 05:24:23 -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.217.170 as permitted sender) X-PHP-List-Original-Sender: dunglas@gmail.com X-Host-Fingerprint: 209.85.217.170 mail-lb0-f170.google.com Received: from [209.85.217.170] ([209.85.217.170:50943] helo=mail-lb0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 27/00-39979-50EBB145 for ; Fri, 19 Sep 2014 01:24:22 -0400 Received: by mail-lb0-f170.google.com with SMTP id n15so565715lbi.15 for ; Thu, 18 Sep 2014 22:24:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=mNhT2rAzz07YaK+rWcVsTryt6dB2vC0HZ5rSUSWdBBw=; b=YZxA9SJSS8G7XevjPGDQRDw5ijox9Pxc28szuHgiOiOxxFtnqLmVqzPIQKxFUUIKWh NGlMrLa5/ymWCQAgiXvAsnwUYEp1xS8ANm69kEZccfSE02Lcc5NpOFzlIK/DaEh4c+Cq 0nTfAxVC6KSBIlMrQwqTB+lMqPPEYzRaM0Wu1NlnHaptyk5EhgqHkc51phsF/XmtPHHs 0sPMdpOPpYNmE6hqLlJipNhD0M067CrCBWiOld/kvJz1KbBM3qKWrFoI60BCmOkP/eWG 4pBbg2VLWe8kkmnANRO7D45vMtGSWnELAbzM5fmcMdBl2ERcchsU32qJHaN90H6+q81t Wdyw== MIME-Version: 1.0 X-Received: by 10.152.170.227 with SMTP id ap3mr4111706lac.15.1411104258050; Thu, 18 Sep 2014 22:24:18 -0700 (PDT) Received: by 10.114.161.164 with HTTP; Thu, 18 Sep 2014 22:24:17 -0700 (PDT) In-Reply-To: References: Date: Fri, 19 Sep 2014 07:24:17 +0200 Message-ID: To: Tjerk Meesters Cc: Andrea Faulds , PHP Internals Content-Type: multipart/alternative; boundary=089e013c65580ace590503645058 Subject: Re: Internationalized Domain Name support in FILTER_VALIDATE_URL From: dunglas@gmail.com (=?UTF-8?Q?K=C3=A9vin_Dunglas?=) --089e013c65580ace590503645058 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, The flag is a good idea to handle old systems but the feature must be enabled by default (at least for PHP 7) and disablable through the flag. IDN RFCs are more than 10 years old. All major browsers and registrars support IDN. Le vendredi 19 septembre 2014, Tjerk Meesters a =C3=A9crit : > > On 19 Sep 2014, at 06:52, Andrea Faulds > wrote= : > > > > > On 18 Sep 2014, at 21:26, K=C3=A9vin Dunglas > wrote: > > > >> I'm working on enhancing the FILTER_VALIDATE_URL filter ( > >> https://github.com/php/php-src/pull/826). > >> The current implementation does not support validation of > internationalized > >> domain names (i.e: http://www.acad=C3=A9mie-fran=C3=A7aise.fr/ > > >> ). > >> > >> Support of IDN validation can be easily added using ICU's > uidna_toASCII() > >> function. > >> > >> Is it acceptable to add a dependency to ICU for ext/filter? > >> Another option is to add a HAVE_ICU constant in main/php_config.h and = to > >> validate IDN only if ICU is present. > >> > >> What strategy is preferred? > > > > Perhaps add a new filter that covers normal URLs and IDN ones? I just > imagine it might cause problems if suddenly IDNs are accepted, if there i= s > a backend which can=E2=80=99t handle them. > > We don=E2=80=99t need a new filter, you can simply add a filter flag for > FILTER_VALIDATE_URL, e.g. FILTER_FLAG_ALLOW_IDN. > > Of course, the ICU dependency should be optional :) > > > > > -- > > Andrea Faulds > > http://ajf.me/ > > > > > > > > > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > --=20 K=C3=A9vin Dunglas Consultant et d=C3=A9veloppeur freelance http://dunglas.fr T=C3=A9l. : 06 60 91 20 20 --089e013c65580ace590503645058--