From: Christian Weiske Date: Fri, 30 Mar 2012 05:54:14 +0000 (+0200) Subject: forking only possible with POST requests now X-Git-Tag: v0.1.0~76 X-Git-Url: https://git.cweiske.de/phorkie.git/commitdiff_plain/a3845de282299bd805d6455789bc6531bde861be?hp=c0550b6ba0b9a676d090986ae566243d29895747 forking only possible with POST requests now --- diff --git a/data/templates/display.htm b/data/templates/display.htm index 0b95912..ca52775 100644 --- a/data/templates/display.htm +++ b/data/templates/display.htm @@ -17,7 +17,9 @@

Paste #{{repo.id}}

- fork +
+ +
diff --git a/www/fork.php b/www/fork.php index 6bec5f0..f6ec95a 100644 --- a/www/fork.php +++ b/www/fork.php @@ -4,6 +4,11 @@ */ namespace Phorkie; require_once 'www-header.php'; + +if ($_SERVER['REQUEST_METHOD'] !== 'POST') { + throw new Exception_Input('Forking only possible via POST'); +} + $repo = new Repository(); $repo->loadFromRequest();