From 0bce768fc81836b77baafe672584cd582c057d19 Mon Sep 17 00:00:00 2001 From: Joe Huss Date: Thu, 1 Feb 2018 06:33:36 -0500 Subject: [PATCH] max distance penalty @ 50 --- src/maxmind.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/maxmind.inc.php b/src/maxmind.inc.php index 631e485..0e4accc 100644 --- a/src/maxmind.inc.php +++ b/src/maxmind.inc.php @@ -266,6 +266,7 @@ function update_maxmind($customer, $module = 'default', $ip = false) { */ $distance_penalty = floor($response['distance'] / 100); + $distance_penalty = $distance_penalty > 50 ? 50 : $distance_penalty; myadmin_log('maxmind', 'info', 'Distance is '.$response['distance'].' or +'.$distance_penalty.' to riskScore (previously '.$response['riskScore'].')', __LINE__, __FILE__); $response['riskScore'] += $distance_penalty;