Skip to content

Commit

Permalink
add log entries for reason of skipped Captcha verification
Browse files Browse the repository at this point in the history
  • Loading branch information
pbiering committed Mar 12, 2023
1 parent 61f7f5a commit 18b5b21
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rcguard.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ public function init()

if (in_array($client_ip, $ignore_ips)) {
$whitelisted = true;
rcube::write_log('rcguard', 'Captcha verification skipped because of client IP ' . $client_ip . ' found in ignore list');
} else {
foreach ($this->rc->config->get('recaptcha_whitelist', []) as $network) {
if ($this->cidr_match($client_ip, $network)) {
$whitelisted = true;
rcube::write_log('rcguard', 'Captcha verification skipped because of client IP ' . $client_ip . ' matches whitelist entry ' . $network);
break;
}
}
Expand Down

0 comments on commit 18b5b21

Please sign in to comment.