mirror of https://github.com/fail2ban/fail2ban
BF: allow processing with empty filter
parent
2f3648c458
commit
b147270be7
|
@ -99,6 +99,7 @@ class JailReader(ConfigReader):
|
||||||
logSys.error("Unable to read the filter")
|
logSys.error("Unable to read the filter")
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
|
self.__filter = None
|
||||||
logSys.warn("No filter set for jail %s" % self.__name)
|
logSys.warn("No filter set for jail %s" % self.__name)
|
||||||
|
|
||||||
# Read action
|
# Read action
|
||||||
|
@ -168,6 +169,7 @@ class JailReader(ConfigReader):
|
||||||
# Do not send a command if the rule is empty.
|
# Do not send a command if the rule is empty.
|
||||||
if regex != '':
|
if regex != '':
|
||||||
stream.append(["set", self.__name, "addignoreregex", regex])
|
stream.append(["set", self.__name, "addignoreregex", regex])
|
||||||
|
if self.__filter:
|
||||||
stream.extend(self.__filter.convert())
|
stream.extend(self.__filter.convert())
|
||||||
for action in self.__actions:
|
for action in self.__actions:
|
||||||
stream.extend(action.convert())
|
stream.extend(action.convert())
|
||||||
|
|
Loading…
Reference in New Issue