Merge branch 'gh-2655--f2b-regex-4-jail': implemented loading of jail settings in fail2ban-regex;

amend to RFE gh-2655
pull/3641/merge
sebres 2024-04-02 18:04:52 +02:00
commit 921d9a5a40
1 changed files with 1 additions and 1 deletions

View File

@ -341,7 +341,7 @@ class Fail2banRegex(object):
if re.search(r'(?ms)^/{0,3}[\w/_\-.]+(?:\[.*\])?$', value):
try:
fltName, fltOpt = extractOptions(value)
if re.search(r'(?ms)^[\w/_\-]+$', fltName): # name of jail?
if not re.search(r'(?ms)(?:/|\.(?:conf|local)$)', fltName): # name of jail?
try:
jail = JailReader(fltName, force_enable=True,
share_config=self.share_config, basedir=basedir)