]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
better client error on CSRF problem with subscribe/unsubscribe
authorEvan Prodromou <evan@prodromou.name>
Fri, 29 Aug 2008 05:16:28 +0000 (01:16 -0400)
committerEvan Prodromou <evan@prodromou.name>
Fri, 29 Aug 2008 05:16:28 +0000 (01:16 -0400)
darcs-hash:20080829051628-84dde-2a339a35c422afb9ec04f757771764ed43b2c28b.gz

actions/subscribe.php
actions/unsubscribe.php

index 8bb723799c3f37a311f84639c19ae5cf7b3910d7..8d04934b7d3fb8b6bd7be3b5d499a577d2f40439 100644 (file)
@@ -41,7 +41,7 @@ class SubscribeAction extends Action {
                $token = $this->trimmed('token');
                
                if (!$token || $token != common_session_token()) {
-                       common_redirect(common_local_url('subscriptions', array('nickname' => $user->nickname)));
+                       $this->client_error(_('There was a problem with your session token. Try again, please.'));
                        return;
                }
 
index e0392413d92214b8411b99bc9c29142d9bfc11f3..4bfaf79580f0c49b316b98efe9f79b71cd7b63c2 100644 (file)
@@ -38,7 +38,7 @@ class UnsubscribeAction extends Action {
                $token = $this->trimmed('token');
                
                if (!$token || $token != common_session_token()) {
-                       common_redirect(common_local_url('subscriptions', array('nickname' => $user->nickname)));
+                       $this->client_error(_('There was a problem with your session token. Try again, please.'));
                        return;
                }