diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-03-12 04:10:52 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-03-12 04:10:52 +0000 |
commit | 63451844f6796a4aa14ac4341d7dfbce3e9d7903 (patch) | |
tree | 9dffc3b8c37ae4765917e91469c81a57fbfea8b5 | |
parent | cae5e22a8d3ac927c526dd9062a44cfc61398667 (diff) |
avid unnecessary cookies
-rwxr-xr-x | ikiwiki | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -777,23 +777,26 @@ sub cgi () { #{{{ eval q{use CGI::Session}; my $q=CGI->new; - # session id has to be _sessionid for CGI::FormBuilder to work. - # TODO: stop having the formbuilder emit cookies and change session - # id to something else. - CGI::Session->name("_sessionid"); - my $session = CGI::Session->new(undef, $q, - { Directory=> "$srcdir/.ikiwiki/sessions" }); my $do=$q->param('do'); if (! defined $do || ! length $do) { error("\"do\" parameter missing"); } + # This does not need a session. if ($do eq 'recentchanges') { cgi_recentchanges($q); return; } + # session id has to be _sessionid for CGI::FormBuilder to work. + # TODO: stop having the formbuilder emit cookies and change session + # id to something else. + CGI::Session->name("_sessionid"); + my $session = CGI::Session->new(undef, $q, + { Directory=> "$srcdir/.ikiwiki/sessions" }); + + # Everything below this point needs the user to be signed in. if ((! $anonok && ! defined $session->param("name")) || $do eq 'signin') { cgi_signin($q, $session); return; |