summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Security/Bruteforce/Throttler.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Security/Bruteforce/Throttler.php b/lib/private/Security/Bruteforce/Throttler.php
index 7b98b3d8288..61e18088e94 100644
--- a/lib/private/Security/Bruteforce/Throttler.php
+++ b/lib/private/Security/Bruteforce/Throttler.php
@@ -227,6 +227,10 @@ class Throttler {
* @return int
*/
public function getAttempts(string $ip, string $action = '', float $maxAgeHours = 12): int {
+ if ($ip === '') {
+ return 0;
+ }
+
$ipAddress = new IpAddress($ip);
if ($this->isIPWhitelisted((string)$ipAddress)) {
return 0;