From b83712e3ec13383a2da961f2a13ed7cd9d09724a 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 4ab8a8a3..e0caae70 100644 --- a/fail2ban/client/fail2banregex.py +++ b/fail2ban/client/fail2banregex.py @@ -331,7 +331,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:]: