From 8ccf506e0ffc66594e1b92753e13d73f0675ccee Mon Sep 17 00:00:00 2001 From: fowr <89118232+perdedora@users.noreply.github.com> Date: Thu, 9 Jan 2025 14:51:37 -0300 Subject: [PATCH] fix captcha being triggered when only new_thread_capt is enabled --- post.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/post.php b/post.php index 2dcfe294..bb15781f 100644 --- a/post.php +++ b/post.php @@ -632,22 +632,22 @@ if (isset($_POST['delete'])) { $dynamic = $config['captcha']['dynamic']; // With our custom captcha provider - if (($provider === 'native' && !$new_thread_capt) - || ($provider === 'native' && $new_thread_capt && $post['op'])) { - $query = $context->get(SecureImageCaptchaQuery::class); - $success = $query->verify($_POST['captcha_text'], $_POST['captcha_cookie']); + if ($provider === 'native') { + if ((!$new_thread_capt && !$post['op']) || ($new_thread_capt && $post['op'])) { + $query = $context->get(SecureImageCaptchaQuery::class); + $success = $query->verify($_POST['captcha_text'], $_POST['captcha_cookie']); - if (!$success) { - error( - "{$config['error']['captcha']} - " - ); + if (!$success) { + error( + "{$config['error']['captcha']} + " + ); + } } } // Remote 3rd party captchas.