From b8fe9569f7b8d8d3b1c8931c87bb940a8c89b9f8 Mon Sep 17 00:00:00 2001 From: Benjamin Southall Date: Fri, 3 Mar 2017 15:25:30 +0900 Subject: [PATCH] Add additonal brackets to min_body post length check in order to ensure operation precedence --- post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/post.php b/post.php index 986320ac..f6418af3 100644 --- a/post.php +++ b/post.php @@ -733,7 +733,7 @@ if (isset($_POST['delete'])) { error(sprintf($config['error']['toolong'], 'subject')); if (!$mod && mb_strlen($post['body']) > $config['max_body']) error($config['error']['toolong_body']); - if (!$mod && mb_strlen($post['body']) > 0 && mb_strlen($post['body']) < $config['min_body']) + if (!$mod && mb_strlen($post['body']) > 0 && (mb_strlen($post['body']) < $config['min_body'])) error($config['error']['tooshort_body']); if (mb_strlen($post['password']) > 20) error(sprintf($config['error']['toolong'], 'password'));