X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/362a3295563a11ae93370d365d9b0369d0726199..a3726968bc13f19f458c372cbd7cf92ae4c6fce5:/IkiWiki/Plugin/comments.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 16f9a873f..833bedf25 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -467,9 +467,21 @@ sub sessioncgi ($$) { } if ($form->submitted eq POST_COMMENT && $form->validate) { - my $file = "$location._comment"; - IkiWiki::checksessionexpiry($cgi, $session); + + $postcomment=1; + IkiWiki::check_content(content => $form->field('editcontent'), + subject => $form->field('subject'), + $config{comments_allowauthor} ? ( + author => $form->field('author'), + url => $form->field('url'), + ) : (), + page => $location, + cgi => $cgi, session => $session + ); + $postcomment=0; + + my $file = "$location._comment"; # FIXME: could probably do some sort of graceful retry # on error? Would require significant unwinding though