- debug("jl sessioncgi1 running.");
-
- if ($q->param('do') eq 'justlogin') {
- debug("Justlogin do=justlogin running.");
- if (! defined $session->param("name") ) {
- debug("Justlogin param!defined running.");
- $session->param(postsignin => $ENV{HTTP_REFERER} );
- $session->param("do" => "justgoback" );
- IkiWiki::cgi_savesession($session);
- IkiWiki::cgi_signin($q, $session);
- exit;
- }
- } elsif ($session->param('do') eq 'justgoback') {
- debug("jl justgoback running.");
- if (! defined $session->param("name")) {
- debug("Justlogin redir running.");
- my $page=IkiWiki::possibly_foolish_untaint($q->param('postsignin'));
- $session->clear("postsignin");
- $session->clear("do");
- IkiWiki::cgi_savesession($session);
- IkiWiki::redirect($q, $page);
- }
- }
- }
-
- sub auth ($$) {
- # While this hook is not currently used, it needs to exist
- # so ikiwiki knows that the wiki supports logins, and will
- # enable the Preferences page.
+ debug("jl sessioncgi1 running.");
+
+ if ($q->param("do") eq "justlogin") {
+ debug("jl do=justlogin running.");
+ if (! defined $session->param("name") ) {
+ debug("jl param!defined running.");
+ $session->param("postsignin" => $ENV{HTTP_REFERER} );
+ $session->param("do" => "justgoback" );
+ IkiWiki::cgi_signin($q, $session);
+ IkiWiki::cgi_savesession($session);
+ }
+ exit;
+ } elsif ($session->param("do") eq "justgoback") {
+ debug("jl justgoback running.");
+ my $page=$q->param("postsignin");
+ $session->clear("postsignin");
+ $session->clear("do");
+ IkiWiki::cgi_savesession($session);
+ IkiWiki::redirect($q, $page);
+ exit;
+ }