summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-02-24 00:20:36 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-02-24 00:20:36 +0000
commit2dfe3efcb7c99cb60c893387db0f21b734e1fbc8 (patch)
tree95b3f72810eb209059469dda3e8444ea27c799af
parent71d8d3bef0e05118847a3b6383b062b0249921c3 (diff)
* Correct a bug that could lead to infinite looping after signin in some
circumstances.
-rw-r--r--IkiWiki/CGI.pm19
-rw-r--r--debian/changelog4
2 files changed, 16 insertions, 7 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index e62bcf477..aee80253b 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -180,13 +180,20 @@ sub cgi_signin ($$) { #{{{
sub cgi_postsignin ($$) { #{{{
my $q=shift;
my $session=shift;
-
+
# Continue with whatever was being done before the signin process.
- my $postsignin=CGI->new($session->param("postsignin"));
- $session->clear("postsignin");
- cgi($postsignin, $session);
- cgi_savesession($session);
- exit;
+ if (defined $session->param("postsignin")) {
+ my $postsignin=CGI->new($session->param("postsignin"));
+ $session->clear("postsignin");
+ cgi($postsignin, $session);
+ cgi_savesession($session);
+ exit;
+ }
+ else {
+ # This can occur, for example, if a user went to the signin
+ # url via a bookmark.
+ redirect($q, $config{url});
+ }
} #}}}
sub cgi_prefs ($$) { #{{{
diff --git a/debian/changelog b/debian/changelog
index 0005334d9..c0a2e546b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -36,8 +36,10 @@ ikiwiki (1.44) UNRELEASED; urgency=low
* French translation update. Closes: #411899
* Patch from HenrikBrixAndersen to fix a broken use of foreach in the
search plugin.
+ * Correct a bug that could lead to infinite looping after signin in some
+ circumstances.
- -- Joey Hess <joeyh@debian.org> Fri, 23 Feb 2007 14:34:18 -0500
+ -- Joey Hess <joeyh@debian.org> Fri, 23 Feb 2007 19:06:13 -0500
ikiwiki (1.43) unstable; urgency=low