From 3546071aa5ae2f5c97f351d49a82f27b051a3541 Mon Sep 17 00:00:00 2001 From: Laurent Desausoi Date: Thu, 22 Jun 2023 09:50:43 +0200 Subject: [PATCH] Restore bans from the database with full ticket information In the case where we use the `ignoreCommand` with information from the ticket, we want these informations to also be included when restoring the bans from the database (the ticket may no longer be required to be banned). --- fail2ban/server/jail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fail2ban/server/jail.py b/fail2ban/server/jail.py index 2c84e475..3309054e 100644 --- a/fail2ban/server/jail.py +++ b/fail2ban/server/jail.py @@ -295,7 +295,7 @@ class Jail(object): ): try: #logSys.debug('restored ticket: %s', ticket) - if self.filter.inIgnoreIPList(ticket.getID(), log_ignore=True): continue + if self.filter.inIgnoreIPList(ticket, log_ignore=True): continue # mark ticked was restored from database - does not put it again into db: ticket.restored = True # correct start time / ban time (by the same end of ban):