X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/a3605a90d56e1c37a85c056411af08f7f09147f6..0bac7cb776cf8b49d99b7a7b24e7542b075b250c:/IkiWiki/CGI.pm diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index f8617bfc6..5baa6c179 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -12,7 +12,7 @@ use Encode; sub printheader ($) { my $session=shift; - if ($ENV{HTTPS} || $config{sslcookie}) { + if (($ENV{HTTPS} && lc $ENV{HTTPS} ne "off") || $config{sslcookie}) { print $session->header(-charset => 'utf-8', -cookie => $session->cookie(-httponly => 1, -secure => 1)); } @@ -79,7 +79,7 @@ sub cgitemplate ($$$;@) { title => $title, wikiname => $config{wikiname}, content => $content, - baseurl => urlabs(urlto(""), $topurl), + baseurl => urlabs(baseurl(), $topurl), html5 => $config{html5}, %params, ); @@ -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; @@ -429,7 +429,7 @@ sub cgi (;$$) { # userinfo db. if (! userinfo_get($session->param("name"), "regdate")) { userinfo_setall($session->param("name"), { - email => "", + email => defined $session->param("email") ? $session->param("email") : "", password => "", regdate => time, }) || error("failed adding user");