forked from leftypol/leftypol
post.php: make dynamic captcha less prone to misuse
This commit is contained in:
parent
40475158eb
commit
8f98665a1c
1 changed files with 19 additions and 19 deletions
6
post.php
6
post.php
|
@ -727,7 +727,8 @@ function handle_post()
|
||||||
|
|
||||||
|
|
||||||
if (!$dropped_post) {
|
if (!$dropped_post) {
|
||||||
if ($config['dynamic_captcha'] !== false && $_SERVER['REMOTE_ADDR'] === $config['dynamic_captcha']) {
|
if ($config['dynamic_captcha'] !== false) {
|
||||||
|
if ($_SERVER['REMOTE_ADDR'] === $config['dynamic_captcha']) {
|
||||||
if ($config['recaptcha']) {
|
if ($config['recaptcha']) {
|
||||||
if (!isset($_POST['g-recaptcha-response'])) {
|
if (!isset($_POST['g-recaptcha-response'])) {
|
||||||
error($config['error']['bot']);
|
error($config['error']['bot']);
|
||||||
|
@ -745,9 +746,8 @@ function handle_post()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
// Check for CAPTCHA right after opening the board so the "return" link is in there.
|
// Check for CAPTCHA right after opening the board so the "return" link is in there.
|
||||||
if ($config['dynamic_captcha'] === false) {
|
|
||||||
if ($config['recaptcha']) {
|
if ($config['recaptcha']) {
|
||||||
if (!isset($_POST['g-recaptcha-response'])) {
|
if (!isset($_POST['g-recaptcha-response'])) {
|
||||||
error($config['error']['bot']);
|
error($config['error']['bot']);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue