mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
amend to 781321d609: better regex to detect jail name (it could contain dot etc)
This commit is contained in:
parent
302252b25c
commit
3b97182f62
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue