forked from GithubBackups/vichan
post.php: do not verify the poster IP if the captcha is dynamic
This commit is contained in:
parent
cb5fb68c5e
commit
f7073d5d7e
7
post.php
7
post.php
@ -661,8 +661,13 @@ if (isset($_POST['delete'])) {
|
|||||||
error($config['error']['bot']);
|
error($config['error']['bot']);
|
||||||
}
|
}
|
||||||
$response = $_POST[$field];
|
$response = $_POST[$field];
|
||||||
|
/*
|
||||||
|
* Do not query with the IP if the mode is dynamic. This config is meant for proxies and internal
|
||||||
|
* loopback addresses.
|
||||||
|
*/
|
||||||
|
$ip = $dynamic ? null : $_SERVER['REMOTE_ADDR'];
|
||||||
|
|
||||||
$success = $query->verify($response, $_SERVER['REMOTE_ADDR']);
|
$success = $query->verify($response, $ip);
|
||||||
if (!$success) {
|
if (!$success) {
|
||||||
error($config['error']['captcha']);
|
error($config['error']['captcha']);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user