forked from leftypol/leftypol
post.php: use the dynamic_captcha config value to pick from which IP to check for captcha reponsens
This commit is contained in:
parent
fccd0a16dd
commit
40475158eb
2 changed files with 7 additions and 3 deletions
4
post.php
4
post.php
|
@ -727,7 +727,7 @@ function handle_post()
|
|||
|
||||
|
||||
if (!$dropped_post) {
|
||||
if ($config['dynamic_captcha'] && $_SERVER['REMOTE_ADDR'] === '127.0.0.1') {
|
||||
if ($config['dynamic_captcha'] !== false && $_SERVER['REMOTE_ADDR'] === $config['dynamic_captcha']) {
|
||||
if ($config['recaptcha']) {
|
||||
if (!isset($_POST['g-recaptcha-response'])) {
|
||||
error($config['error']['bot']);
|
||||
|
@ -747,7 +747,7 @@ function handle_post()
|
|||
}
|
||||
|
||||
// Check for CAPTCHA right after opening the board so the "return" link is in there.
|
||||
if (!$config['dynamic_captcha']) {
|
||||
if ($config['dynamic_captcha'] === false) {
|
||||
if ($config['recaptcha']) {
|
||||
if (!isset($_POST['g-recaptcha-response'])) {
|
||||
error($config['error']['bot']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue