From 2e0b169f8f172c57c0b1af9432574c3a220d80d5 Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Wed, 24 Dec 2008 14:32:17 -0500 Subject: [PATCH] require POST for tag and untag routes --- content/config/routes.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/content/config/routes.php b/content/config/routes.php index 4fa5cf4a0..d5abf1e6d 100644 --- a/content/config/routes.php +++ b/content/config/routes.php @@ -26,11 +26,13 @@ $mapper->connect('users.:(format)', array('controller' => 'tag', 'action' => 'se // Tag an object. Required POST parameters are: tags (array or string list) and // objectId. userId is inferred from the authenticated user: -$mapper->connect('tag', array('controller' => 'tag', 'action' => 'tag')); +$mapper->connect('tag', array('controller' => 'tag', 'action' => 'tag', + 'conditions' => array('method' => array('POST')))); // Untag an object. Required POST parameters are: tags (array or string list) // and objectId. userId is inferred from the authenticated user: -$mapper->connect('untag', array('controller' => 'tag', 'action' => 'untag')); +$mapper->connect('untag', array('controller' => 'tag', 'action' => 'untag', + 'conditions' => array('method' => array('POST')))); // Local route overrides -- 2.11.0