post.php: use hash_equals to compare post deletion password

This commit is contained in:
Zankaria 2024-10-07 23:48:52 +02:00
parent 27286cdcee
commit 169bf13f5d

View file

@ -512,8 +512,8 @@ function handle_delete()
if (
$password != ''
&& $post['password'] != $password
&& (!$thread || $thread['password'] != $password)
&& !hash_equals($post['password'], $password)
&& (!$thread || !hash_equals($thread['password'], $password))
&& !$is_mod
) {
error($config['error']['invalidpassword']);