|
|
@ -322,17 +322,24 @@ if (isset($_POST['delete'])) { |
|
|
|
} |
|
|
|
|
|
|
|
if ($config['report_captcha']) { |
|
|
|
$ch = curl_init($config['domain'].'/'.$config['captcha']['provider_check'] . "?" . http_build_query([ |
|
|
|
'mode' => 'check', |
|
|
|
'text' => $_POST['captcha_text'], |
|
|
|
'extra' => $config['captcha']['extra'], |
|
|
|
'cookie' => $_POST['captcha_cookie'] |
|
|
|
])); |
|
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
|
|
$resp = curl_exec($ch); |
|
|
|
|
|
|
|
if ($resp !== '1') { |
|
|
|
error($config['error']['captcha']); |
|
|
|
if ($config['captcha']['local']) { |
|
|
|
require_once '.' . $config['captcha']['provider_check']; |
|
|
|
if (!captcha_check($_POST['captcha_cookie'], $config['captcha']['extra'], $_POST['captcha_text'])) { |
|
|
|
error($config['error']['captcha']); |
|
|
|
} |
|
|
|
} else { |
|
|
|
$ch = curl_init($config['domain'].$config['captcha']['provider_check'] . "?" . http_build_query([ |
|
|
|
'mode' => 'check', |
|
|
|
'text' => $_POST['captcha_text'], |
|
|
|
'extra' => $config['captcha']['extra'], |
|
|
|
'cookie' => $_POST['captcha_cookie'] |
|
|
|
])); |
|
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
|
|
$resp = curl_exec($ch); |
|
|
|
|
|
|
|
if ($resp !== '1') { |
|
|
|
error($config['error']['captcha']); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -431,18 +438,25 @@ if (isset($_POST['delete'])) { |
|
|
|
} |
|
|
|
// Same, but now with our custom captcha provider |
|
|
|
if (($config['captcha']['enabled']) || (($post['op']) && ($config['new_thread_capt'])) ) { |
|
|
|
$ch = curl_init($config['domain'].'/'.$config['captcha']['provider_check'] . "?" . http_build_query([ |
|
|
|
'mode' => 'check', |
|
|
|
'text' => $_POST['captcha_text'], |
|
|
|
'extra' => $config['captcha']['extra'], |
|
|
|
'cookie' => $_POST['captcha_cookie'] |
|
|
|
])); |
|
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
|
|
$resp = curl_exec($ch); |
|
|
|
|
|
|
|
if ($resp !== '1') { |
|
|
|
error($config['error']['captcha'] . |
|
|
|
'<script>if (actually_load_captcha !== undefined) actually_load_captcha("'.$config['captcha']['provider_get'].'", "'.$config['captcha']['extra'].'");</script>'); |
|
|
|
if ($config['captcha']['local']) { |
|
|
|
require_once '.' . $config['captcha']['provider_check']; |
|
|
|
if (!captcha_check($_POST['captcha_cookie'], $config['captcha']['extra'], $_POST['captcha_text'])) { |
|
|
|
error($config['error']['captcha']); |
|
|
|
} |
|
|
|
} else { |
|
|
|
$ch = curl_init($config['domain'].$config['captcha']['provider_check'] . "?" . http_build_query([ |
|
|
|
'mode' => 'check', |
|
|
|
'text' => $_POST['captcha_text'], |
|
|
|
'extra' => $config['captcha']['extra'], |
|
|
|
'cookie' => $_POST['captcha_cookie'] |
|
|
|
])); |
|
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
|
|
$resp = curl_exec($ch); |
|
|
|
|
|
|
|
if ($resp !== '1') { |
|
|
|
error($config['error']['captcha'] . |
|
|
|
'<script>if (actually_load_captcha !== undefined) actually_load_captcha("'.$config['captcha']['provider_get'].'", "'.$config['captcha']['extra'].'");</script>'); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|