]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
* Only try postsignin if no other action matched. Fixes a bug where the
authorJoey Hess <joey@kodama.kitenet.net>
Mon, 7 Jan 2008 20:56:39 +0000 (15:56 -0500)
committerJoey Hess <joey@kodama.kitenet.net>
Mon, 7 Jan 2008 20:56:39 +0000 (15:56 -0500)
  user goes back from the signin screen and does something else.
* Improve behavior when trying to sign in with no cookies.

IkiWiki/CGI.pm
debian/changelog

index 1522feb1ea822ddb1896ab99a1f1910cc4d31b19..197eabcf01a2a881a47ebc9680b0c7a1c70f866b 100644 (file)
@@ -133,9 +133,7 @@ sub needsignin ($$) { #{{{
 
        if (! defined $session->param("name") ||
            ! userinfo_get($session->param("name"), "regdate")) {
-               if (! defined $session->param("postsignin")) {
-                       $session->param(postsignin => $ENV{QUERY_STRING});
-               }
+               $session->param(postsignin => $ENV{QUERY_STRING});
                cgi_signin($q, $session);
                cgi_savesession($session);
                exit;
@@ -195,9 +193,7 @@ sub cgi_postsignin ($$) { #{{{
                exit;
        }
        else {
-               # This can occur, for example, if a user went to the signin
-               # url via a bookmark.
-               redirect($q, $config{url});
+               error(gettext("login failed, perhaps you need to turn on cookies?"));
        }
 } #}}}
 
@@ -710,17 +706,14 @@ sub cgi (;$$) { #{{{
                cgi_signin($q, $session);
                cgi_savesession($session);
        }
-       elsif (defined $session->param("postsignin")) {
-               cgi_postsignin($q, $session);
-       }
        elsif ($do eq 'prefs') {
                cgi_prefs($q, $session);
        }
        elsif ($do eq 'create' || $do eq 'edit') {
                cgi_editpage($q, $session);
        }
-       elsif ($do eq 'postsignin') {
-               error(gettext("login failed, perhaps you need to turn on cookies?"));
+       elsif (defined $session->param("postsignin")) {
+               cgi_postsignin($q, $session);
        }
        else {
                error("unknown do parameter");
index 5e119baf0bb653fe5c9bd69152a718dfa1060d99..b39b053d4ec9ef9c34e7239b2cfd79b63861a6fd 100644 (file)
@@ -1,3 +1,11 @@
+ikiwiki (2.19) UNRELEASED; urgency=low
+
+  * Only try postsignin if no other action matched. Fixes a bug where the
+    user goes back from the signin screen and does something else.
+  * Improve behavior when trying to sign in with no cookies.
+
+ -- Joey Hess <joeyh@debian.org>  Mon, 07 Jan 2008 15:35:16 -0500
+
 ikiwiki (2.18) unstable; urgency=low
 
   * Split error messages for failures to drop real uid and gid.