From dc7a507526034fbdeb146fb6749c93c3d06f0a46 Mon Sep 17 00:00:00 2001 From: Horija Date: Mon, 24 Apr 2017 12:21:33 +0200 Subject: [PATCH] Update post.php --- post.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/post.php b/post.php index 47c5f0ef..fb1ee645 100644 --- a/post.php +++ b/post.php @@ -384,7 +384,20 @@ if (isset($_POST['delete'])) { if (!$resp->is_valid) { error($config['error']['captcha']); } + // Same, but now with our custom captcha provider + if (($config['captcha']['enabled']) || (($post['op']) && ($config['new_thread_capt'])) ) { + $resp = file_get_contents($config['captcha']['provider_check'] . "?" . http_build_query([ + 'mode' => 'check', + 'text' => $_POST['captcha_text'], + 'extra' => $config['captcha']['extra'], + 'cookie' => $_POST['captcha_cookie'] + ])); + if ($resp !== '1') { + error($config['error']['captcha'] . + ''); } + } +} if (!(($post['op'] && $_POST['post'] == $config['button_newtopic']) || (!$post['op'] && $_POST['post'] == $config['button_reply'])))