forked from GithubBackups/vichan
fix captcha being triggered when only new_thread_capt is enabled
This commit is contained in:
parent
1212c18616
commit
8ccf506e0f
30
post.php
30
post.php
@ -632,22 +632,22 @@ if (isset($_POST['delete'])) {
|
|||||||
$dynamic = $config['captcha']['dynamic'];
|
$dynamic = $config['captcha']['dynamic'];
|
||||||
|
|
||||||
// With our custom captcha provider
|
// With our custom captcha provider
|
||||||
if (($provider === 'native' && !$new_thread_capt)
|
if ($provider === 'native') {
|
||||||
|| ($provider === 'native' && $new_thread_capt && $post['op'])) {
|
if ((!$new_thread_capt && !$post['op']) || ($new_thread_capt && $post['op'])) {
|
||||||
$query = $context->get(SecureImageCaptchaQuery::class);
|
$query = $context->get(SecureImageCaptchaQuery::class);
|
||||||
$success = $query->verify($_POST['captcha_text'], $_POST['captcha_cookie']);
|
$success = $query->verify($_POST['captcha_text'], $_POST['captcha_cookie']);
|
||||||
|
|
||||||
if (!$success) {
|
if (!$success) {
|
||||||
error(
|
error(
|
||||||
"{$config['error']['captcha']}
|
"{$config['error']['captcha']}
|
||||||
<script>
|
<script>
|
||||||
if (actually_load_captcha !== undefined)
|
if (actually_load_captcha !== undefined)
|
||||||
actually_load_captcha(
|
actually_load_captcha(
|
||||||
\"{$config['captcha']['provider_get']}\",
|
\"{$config['captcha']['provider_get']}\"
|
||||||
\"{$config['captcha']['extra']}\"
|
);
|
||||||
);
|
</script>"
|
||||||
</script>"
|
);
|
||||||
);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Remote 3rd party captchas.
|
// Remote 3rd party captchas.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user