From 7152766ca1f1b6b80a2da279db6d07a676493c73 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 5 Mar 2019 20:09:06 -0800 Subject: [PATCH] Fixed bug where db_creation_date_key was never found in the db keys. --- bin/fail2ban_digest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/fail2ban_digest b/bin/fail2ban_digest index bb6737f..8f41670 100755 --- a/bin/fail2ban_digest +++ b/bin/fail2ban_digest @@ -110,7 +110,7 @@ def db_busy_open(filename, flags, timeout): def add(db, ip): db = db_busy_open(db_location + '/' + db + '.dbm', 'c', 30) - if db_creation_date_key not in db.keys(): + if db_creation_date_key.encode('UTF-8') not in db.keys(): db[db_creation_date_key] = datetime.utcnow().strftime(db_date_format).encode('UTF-8') event_date = ('%s, ' % datetime.utcnow().strftime(db_date_format)).encode('UTF-8') try: