aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/CGI.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2012-04-08 14:12:02 -0400
committerJoey Hess <joey@kitenet.net>2012-04-08 14:14:33 -0400
commit4e1806ef7c002a4a333c5822c13d7ceca303bf70 (patch)
treeb434ab335fc3ce72a64d30fe8ddd147602743cf7 /IkiWiki/CGI.pm
parentbcc2809b960d459966e563ed78e7e0793307b8ec (diff)
downloadikiwiki-4e1806ef7c002a4a333c5822c13d7ceca303bf70.tar
ikiwiki-4e1806ef7c002a4a333c5822c13d7ceca303bf70.tar.gz
save whole form state, not just QUERY_STRING, for postsignin
Normally, needsignin is called when there is a QUERY_STRING, not when a form is posted. However, it's certianly possible, and should be supported, to make a form that invokes an ikiwiki action that checks needsignin. I encountered this when posting ?do=rename&page=foo. The form is displayed without checking needsignin, for complicated reasons. Posting the form is when the true authentication happens.
Diffstat (limited to 'IkiWiki/CGI.pm')
-rw-r--r--IkiWiki/CGI.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index 62383b6fd..5baa6c179 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -131,7 +131,7 @@ sub needsignin ($$) {
if (! defined $session->param("name") ||
! userinfo_get($session->param("name"), "regdate")) {
- $session->param(postsignin => $ENV{QUERY_STRING});
+ $session->param(postsignin => $q->query_string);
cgi_signin($q, $session);
cgi_savesession($session);
exit;