From a811e2e594cdf3f6be3aee9ad66c38ca21e88b7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc?= <1536036+zoic21@users.noreply.github.com> Date: Thu, 17 Oct 2024 15:47:27 +0200 Subject: [PATCH] try bugfix --- core/class/user.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/class/user.class.php b/core/class/user.class.php index dab738e135..445d60e9f3 100644 --- a/core/class/user.class.php +++ b/core/class/user.class.php @@ -309,7 +309,7 @@ public static function isBan(): bool { } if (count($ban_ips) > 0 && is_int(intval(config::byKey('security::bantime')))) { foreach ($ban_ips as $ip => $datetime) { - if (config::byKey('security::bantime') == -1 || $datetime + intval(config::byKey('security::bantime')) > strtotime('now')) { + if (config::byKey('security::bantime') == -1 || intval($datetime) + intval(config::byKey('security::bantime')) > strtotime('now')) { if ($ip == $current_ip) { jeedom::event('ip_ban', false, ['ip' => $ip, 'datetime' => $datetime]); return true;