From 7eac4ac06fb03b8fce9b5d8bd368493482a1efe7 Mon Sep 17 00:00:00 2001 From: sebres Date: Fri, 11 Feb 2022 21:11:29 +0100 Subject: [PATCH] fail2ban-regex: accepts filter parameters with new-line --- fail2ban/client/fail2banregex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fail2ban/client/fail2banregex.py b/fail2ban/client/fail2banregex.py index 90e178f9..8c03b2dd 100644 --- a/fail2ban/client/fail2banregex.py +++ b/fail2ban/client/fail2banregex.py @@ -334,7 +334,7 @@ class Fail2banRegex(object): fltFile = None fltOpt = {} if regextype == 'fail': - if re.search(r'^/{0,3}[\w/_\-.]+(?:\[.*\])?$', value): + if re.search(r'^(?ms)/{0,3}[\w/_\-.]+(?:\[.*\])?$', value): try: fltName, fltOpt = extractOptions(value) if "." in fltName[~5:]: