diff options
author | Simon McVittie <smcv@ http://smcv.pseudorandom.co.uk/> | 2008-11-23 17:52:30 +0000 |
---|---|---|
committer | Simon McVittie <smcv@ http://smcv.pseudorandom.co.uk/> | 2008-12-11 21:14:04 +0000 |
commit | 80e84e32bf98ed76d0e207e414035b36b9232191 (patch) | |
tree | b88f5b34a639eff3217b2a26b31ba72c033f2883 /IkiWiki | |
parent | 24bfc3fdc52fd55703c6b618b768cfb0905456d3 (diff) | |
download | ikiwiki-80e84e32bf98ed76d0e207e414035b36b9232191.tar ikiwiki-80e84e32bf98ed76d0e207e414035b36b9232191.tar.gz |
Delay checking for session expiry til we actually post a comment
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/comments.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 58076938b..d149e5982 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -264,7 +264,6 @@ sub sessioncgi ($$) { #{{{ $page)); } - IkiWiki::checksessionexpiry($session, $cgi->param('sid')); IkiWiki::check_canedit($page . "[postcomment]", $cgi, $session); my ($authorurl, $author) = linkuser(getcgiuser($session)); @@ -354,6 +353,8 @@ sub sessioncgi ($$) { #{{{ if ($form->submitted eq POST_COMMENT && $form->validate) { my $file = "$location._comment"; + IkiWiki::checksessionexpiry($session, $cgi->param('sid')); + # FIXME: could probably do some sort of graceful retry # on error? Would require significant unwinding though writefile($file, $config{srcdir}, $content); |