diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-01-07 15:56:39 -0500 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-01-07 15:56:39 -0500 |
commit | 9dbbbd0efacb5acebaed2d0ee74d1c185b27394a (patch) | |
tree | 234f30b11925e9af6feb6a385587e926b2c7ae59 | |
parent | 4ac5685744e3678e8c583f671978746ddc37e9a1 (diff) |
* 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.
-rw-r--r-- | IkiWiki/CGI.pm | 15 | ||||
-rw-r--r-- | debian/changelog | 8 |
2 files changed, 12 insertions, 11 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 1522feb1e..197eabcf0 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -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"); diff --git a/debian/changelog b/debian/changelog index 5e119baf0..b39b053d4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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. |