]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* Correct a bug that could lead to infinite looping after signin in some
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sat, 24 Feb 2007 00:20:36 +0000 (00:20 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sat, 24 Feb 2007 00:20:36 +0000 (00:20 +0000)
  circumstances.

IkiWiki/CGI.pm
debian/changelog

index e62bcf477601ec38be1178ba3ce3207c1e588293..aee80253ba94401e9b517f99f1dcc87b8549145b 100644 (file)
@@ -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 ($$) { #{{{
index 0005334d9d582009f01676acf231ff53d20e88aa..c0a2e546bb041c5f77b4e300d2f40a5c4757d331 100644 (file)
@@ -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