summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-08-29 00:09:25 -0400
committerEvan Prodromou <evan@prodromou.name>2008-08-29 00:09:25 -0400
commitd0a466bdb76046421fe1274327453afede5ed6a9 (patch)
treeb5b415bfc758c7555fbd0000a34c5a10b3082d57 /actions
parent42a6492152a85124d8832b75ee05be3906a98d55 (diff)
swap around some stuff to show the form correctly on a CSRF error in openidlogin
darcs-hash:20080829040925-84dde-7195734eeb3df6439c099c1139caf77e2c2ea3c1.gz
Diffstat (limited to 'actions')
-rw-r--r--actions/openidlogin.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/actions/openidlogin.php b/actions/openidlogin.php
index 136421cb0..b066b9aa4 100644
--- a/actions/openidlogin.php
+++ b/actions/openidlogin.php
@@ -28,14 +28,15 @@ class OpenidloginAction extends Action {
if (common_logged_in()) {
common_user_error(_('Already logged in.'));
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
+ $openid_url = $this->trimmed('openid_url');
+
# CSRF protection
$token = $this->trimmed('token');
if (!$token || $token != common_session_token()) {
- $this->show_form(_('There was a problem with your session token. Try again, please.'));
+ $this->show_form(_('There was a problem with your session token. Try again, please.'), $openid_url);
return;
}
- $openid_url = $this->trimmed('openid_url');
$result = oid_authenticate($openid_url,
'finishopenidlogin');
if (is_string($result)) { # error message