diff --git a/fail2ban/server/failregex.py b/fail2ban/server/failregex.py index 0ae9acc5..15a7699f 100644 --- a/fail2ban/server/failregex.py +++ b/fail2ban/server/failregex.py @@ -91,6 +91,13 @@ R_MAP = { "PORT": "fport", } +# map global flags like ((?i)xxx) or (?:(?i)xxx) to local flags (?i:xxx) if supported by RE-engine in this python version: +try: + re.search("^re(?i:val)$", "reVAL") + R_GLOB2LOCFLAGS = ( re.compile(r"(?