Skip to content

Commit

Permalink
same
Browse files Browse the repository at this point in the history
  • Loading branch information
zoic21 authored Oct 17, 2024
1 parent 9d0a3f4 commit 4c50631
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/class/user.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,9 @@ public static function isBan(): bool {
}
if (count($ban_ips) > 0 && is_int(intval(config::byKey('security::bantime')))) {
foreach ($ban_ips as $ip => $datetime) {
if(!is_int(intval($datetime))){
continue;
}
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' => intval($datetime)]);
Expand Down

0 comments on commit 4c50631

Please sign in to comment.