1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-27 17:00:52 +01:00

allow posts to be discarded for too many lines

This commit is contained in:
RealAngeleno 2023-05-20 15:38:40 -07:00 committed by GitHub
parent 727e8723f0
commit bb59e907b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -728,8 +728,10 @@ if (isset($_POST['delete'])) {
error(sprintf($config['error']['toolong'], 'email'));
if (mb_strlen($post['subject']) > 100)
error(sprintf($config['error']['toolong'], 'subject'));
if (!$mod && mb_strlen($post['body']) > $config['max_body'])
if (!$mod && substr_count($post['body']) > $config['max_body'])
error($config['error']['toolong_body']);
if (!$mod && substr_count($post['body'], "\n") >= $config['max_lines'])
error($config['error']['toomanylines']);
if (mb_strlen($post['password']) > 20)
error(sprintf($config['error']['toolong'], 'password'));
}