better client error on CSRF problem with subscribe/unsubscribe

darcs-hash:20080829051628-84dde-2a339a35c422afb9ec04f757771764ed43b2c28b.gz
This commit is contained in:
Evan Prodromou 2008-08-29 01:16:28 -04:00
parent 4272da4e9e
commit 9b741c4f9a
2 changed files with 2 additions and 2 deletions

View 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;
}

View 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;
}