]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
swap around some stuff to show the form correctly on a CSRF error in openidlogin
authorEvan Prodromou <evan@prodromou.name>
Fri, 29 Aug 2008 04:09:25 +0000 (00:09 -0400)
committerEvan Prodromou <evan@prodromou.name>
Fri, 29 Aug 2008 04:09:25 +0000 (00:09 -0400)
darcs-hash:20080829040925-84dde-7195734eeb3df6439c099c1139caf77e2c2ea3c1.gz

actions/openidlogin.php

index 136421cb0d85066e9c597215cb0e5325b45660fd..b066b9aa4ecdb349381d1e0c4fbd38e7aa7b563b 100644 (file)
@@ -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