X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/362a3295563a11ae93370d365d9b0369d0726199..f7b2cfcf50f12ad6ce7358f74e8db9d6083aa284:/IkiWiki/Plugin/comments.pm diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 16f9a873f..14e785c8f 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -467,9 +467,18 @@ sub sessioncgi ($$) { } if ($form->submitted eq POST_COMMENT && $form->validate) { - my $file = "$location._comment"; - IkiWiki::checksessionexpiry($cgi, $session); + + 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); + + my $file = "$location._comment"; # FIXME: could probably do some sort of graceful retry # on error? Would require significant unwinding though