Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93183 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46602 invoked from network); 11 May 2016 01:12:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 May 2016 01:12:40 -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.192.52 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.192.52 mail-qg0-f52.google.com Received: from [209.85.192.52] ([209.85.192.52:34893] helo=mail-qg0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5F/BE-63163-70782375 for ; Tue, 10 May 2016 21:12:40 -0400 Received: by mail-qg0-f52.google.com with SMTP id f74so16551880qge.2 for ; Tue, 10 May 2016 18:12:39 -0700 (PDT) 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; bh=uPdxfhEZggUsaHuSGYknVPVV7tJ/9U5Jk7jqwQfrq5k=; b=w6lvSqgSpBQKg+CNgjlGZ5na7ZfKR+OyPadi+E7aBNy6c4x66CGcaR8oDaJqQ4xD4S yAjtrbrt+M2/gCHHjwT9A6jFRqxOlbc378PaJBLw4FeQVA2obaujRCibpSi0MOklIzEB Jfnz/YRNGB3iAnX7t2o+Vxw7a03uoYUbFTiige4n5pnWwEMA6Ne30R1/dJMrI+rGK8Ft 4PPgTrnqU3SCambHVD1beN+wX8wl6Y2jrQ3N+nsqgkdJHvrmexQup6UWMkg0BpczwZld NwJrdtdxY6qpohPI+bTryZbfwz3bqCjyeltFzEpgXw/0GJjGA/qmjQIy3n8DRuzB7P83 64VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=uPdxfhEZggUsaHuSGYknVPVV7tJ/9U5Jk7jqwQfrq5k=; b=fiq3OtkVA/1ikIU1nEQNv5FeD4eUYmTDixDk8ZNU/M6K/taPQZB8nNaAwybT2jxFH2 a+3OykadZSi/OOWZPbgeELaX6pxtBQWHV6G9rktAkfk5Fipb2WK4lmv3SPTLO//CPx4E heYBs6gc88I6g0WvvCUEPZ5AhlTbqbXymtcCcM/d20dQ+82HykpQSQbnNskpSgHtLEYZ goPjAyTrNP7dhRBRRPONBH/cl6R4whU1NueZFwG5hH8QAnBh6qYCe82Ot7dJtd7+WGFX U8/ES9HSGz0JL6T0eppN/AH7TSpzNKx4lg4qCciquINa+jFuCQ0bcZzKOyjeFkpauQUU XRRw== X-Gm-Message-State: AOPr4FWN+XocmdMPFa2/1t7xsFOmytrNVehF5V2f3fSXrP0UnqJPz/1PJxBTsTkV4C/t/01jzOF0dn5XrRH7RQ== X-Received: by 10.140.150.20 with SMTP id 20mr627692qhw.98.1462929157130; Tue, 10 May 2016 18:12:37 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.140.27.133 with HTTP; Tue, 10 May 2016 18:11:57 -0700 (PDT) In-Reply-To: References: <3b115b37-d399-0b69-24b4-de5c95c4a069@gmail.com> Date: Wed, 11 May 2016 10:11:57 +0900 X-Google-Sender-Auth: _n2uuj3v1Z1CkzXogKCZwHDJb2c Message-ID: To: Stanislav Malyshev Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC DRAFT] Automatic CSRF Protection From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi Stas, On Wed, May 11, 2016 at 7:58 AM, Stanislav Malyshev wrote: >>> Add where? And where that value would come from? RFC says nothing about >>> that. >> >> As usual. Query parameter when GET is used. Additional input when POST >> is used. All users have to do is adding CSRF token to JS program. > > GET and POST aren't the only HTTP methods. And where JS program would > get the correct token from? As far as I can see, there's no function in > the RFC that produces it. PHP doesn't have other method support yet. If users have their implementation PUT/etc, they may validate CSRF token manually. I intended this feature for simple applications that lacks CSRF protection at first, but it seems I'm better to change objective. I'll change target to semi automatic/manual CSRF protection. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net