Delay checking for session expiry til we actually post a comment
parent
24bfc3fdc5
commit
80e84e32bf
|
@ -264,7 +264,6 @@ sub sessioncgi ($$) { #{{{
|
||||||
$page));
|
$page));
|
||||||
}
|
}
|
||||||
|
|
||||||
IkiWiki::checksessionexpiry($session, $cgi->param('sid'));
|
|
||||||
IkiWiki::check_canedit($page . "[postcomment]", $cgi, $session);
|
IkiWiki::check_canedit($page . "[postcomment]", $cgi, $session);
|
||||||
|
|
||||||
my ($authorurl, $author) = linkuser(getcgiuser($session));
|
my ($authorurl, $author) = linkuser(getcgiuser($session));
|
||||||
|
@ -354,6 +353,8 @@ sub sessioncgi ($$) { #{{{
|
||||||
if ($form->submitted eq POST_COMMENT && $form->validate) {
|
if ($form->submitted eq POST_COMMENT && $form->validate) {
|
||||||
my $file = "$location._comment";
|
my $file = "$location._comment";
|
||||||
|
|
||||||
|
IkiWiki::checksessionexpiry($session, $cgi->param('sid'));
|
||||||
|
|
||||||
# FIXME: could probably do some sort of graceful retry
|
# FIXME: could probably do some sort of graceful retry
|
||||||
# on error? Would require significant unwinding though
|
# on error? Would require significant unwinding though
|
||||||
writefile($file, $config{srcdir}, $content);
|
writefile($file, $config{srcdir}, $content);
|
||||||
|
|
Loading…
Reference in New Issue