Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72029 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51648 invoked from network); 3 Feb 2014 01:44:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Feb 2014 01:44:32 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.53 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.215.53 mail-la0-f53.google.com Received: from [209.85.215.53] ([209.85.215.53:52802] helo=mail-la0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F9/28-30967-F74FEE25 for ; Sun, 02 Feb 2014 20:44:31 -0500 Received: by mail-la0-f53.google.com with SMTP id e16so4890947lan.40 for ; Sun, 02 Feb 2014 17:44:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=P39W0/VZwz6MqvZtiy1EjtIHDPTfOBvpt2j5TyiExYQ=; b=tOxH+OZBOs1ZMsF6ULB1jdoR3tx8aOD03p/uD/yGpp1P/FeuGUKxuh0neT6sRe/rOk mrmpvrTeNLmCvBZVIbKdO8gLmoTe0qVmubRZewlyFT7bbdFFW8sseusnb60DnPyTmuVX p7niCe9/Hr9Ut/FhHLk0gPAtJZgstjv7kpmGGbOJi2tCUy05Ld+KyrUCWThoGZRPyibS TVOST+KQmVJHVuKQ0NPY7+kqcqrUi1KmRr+4BRwj2EgiRPYIDbUh74sV7avQoEhq4Uu8 Zw/35WQJPOgo4IULc0SoAlkNUIl8iJp7A/cvVOppDuoDlvBNcH81puo1pX3ee+0G+/dd iTKQ== X-Received: by 10.112.140.202 with SMTP id ri10mr22336714lbb.9.1391391868210; Sun, 02 Feb 2014 17:44:28 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.199.37 with HTTP; Sun, 2 Feb 2014 17:43:48 -0800 (PST) In-Reply-To: <52EE1C2B.7030702@sugarcrm.com> References: <52EDBB30.3070209@ajf.me> <52EE1C2B.7030702@sugarcrm.com> Date: Mon, 3 Feb 2014 10:43:48 +0900 X-Google-Sender-Auth: 0PiwnSlmiTpiwowQz8IOgP2_Zts Message-ID: To: Stas Malyshev Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11c25dea0c535504f176aa0f Subject: Re: [PHP-DEV] [RFC] Improve HTML escape From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11c25dea0c535504f176aa0f Content-Type: text/plain; charset=UTF-8 Hi Stas, On Sun, Feb 2, 2014 at 7:21 PM, Stas Malyshev wrote: > > Making ENT_QUOTES as a default is good idea also. > > I should have add this to the RFC. > > Why is it a good idea? Could you explain what it adds to the security of > this function? Users can do and this is valid. I think there is no reason not to escape ' by default. I agree that user should not use unquoted attributes in general. '/' escape could be still useful. For example, user may have validation code that allows printable ASCII chars w/o spaces. '/' escape may protect apps from generating invalid tag in this case. We could say "your application is broken in first place". However, both "'" and '/" escapes do not break apps at all, yet it covers some issues. There is no reason not to escape these chars by default. IMHO. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11c25dea0c535504f176aa0f--