From: Evan Prodromou Date: Fri, 29 Aug 2008 05:16:28 +0000 (-0400) Subject: better client error on CSRF problem with subscribe/unsubscribe X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9b741c4f9a211906f18b8aee7fe7cee58f911403;p=quix0rs-gnu-social.git better client error on CSRF problem with subscribe/unsubscribe darcs-hash:20080829051628-84dde-2a339a35c422afb9ec04f757771764ed43b2c28b.gz --- diff --git a/actions/subscribe.php b/actions/subscribe.php index 8bb723799c..8d04934b7d 100644 --- a/actions/subscribe.php +++ b/actions/subscribe.php @@ -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; } diff --git a/actions/unsubscribe.php b/actions/unsubscribe.php index e0392413d9..4bfaf79580 100644 --- a/actions/unsubscribe.php +++ b/actions/unsubscribe.php @@ -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; }