1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-01-22 19:32:04 +01:00

post.php: add minimum body length check

This commit is contained in:
Zankaria 2024-11-27 21:56:03 +01:00
parent dcd43b71dc
commit d0de1d82d3

View File

@ -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']);
}