From d0de1d82d380484d7a0b911783d89dcb4f508362 Mon Sep 17 00:00:00 2001 From: Zankaria Date: Wed, 27 Nov 2024 21:56:03 +0100 Subject: [PATCH] post.php: add minimum body length check --- post.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/post.php b/post.php index e9a8e926..29fe5b6f 100644 --- a/post.php +++ b/post.php @@ -967,6 +967,9 @@ if (isset($_POST['delete'])) { if (!$mod && mb_strlen($post['body']) > $config['max_body']) { error($config['error']['toolong_body']); } + if (!$mod && $config['force_body'] && mb_strlen($post['body']) < $config['min_body']) { + error($config['error']['tooshort_body']); + } if (!$mod && substr_count($post['body'], "\n") >= $config['maximum_lines']) { error($config['error']['toomanylines']); }