mirror of https://github.com/fail2ban/fail2ban
Merge branch 'master' of https://github.com/fail2ban/fail2ban into ban-time-incr
commit
70080b112a
|
@ -28,6 +28,8 @@ ver. 0.9.1 (2014/xx/xx) - better, faster, stronger
|
|||
* Recursive action tags now fully processed. Fixes issue with bsd-ipfw
|
||||
action
|
||||
* Correct times for non-timezone date times formats - Thanks sebres
|
||||
* Fixed TypeError with "ipfailures" and "ipjailfailures" action tags.
|
||||
Thanks Serg G. Brester
|
||||
|
||||
- New features:
|
||||
- Added monit filter thanks Jason H Martin.
|
||||
|
|
|
@ -271,11 +271,9 @@ class Actions(JailThread, Mapping):
|
|||
# [todo] move merging to observer - here we could read already merged info from database (faster);
|
||||
if self._jail.database is not None:
|
||||
aInfo["ipmatches"] = lambda jail=self._jail: "\n".join(
|
||||
jail.database.getBansMerged(ip=ip).getMatches()
|
||||
)
|
||||
jail.database.getBansMerged(ip=ip).getMatches())
|
||||
aInfo["ipjailmatches"] = lambda jail=self._jail: "\n".join(
|
||||
jail.database.getBansMerged(ip=ip, jail=jail).getMatches()
|
||||
)
|
||||
jail.database.getBansMerged(ip=ip, jail=jail).getMatches())
|
||||
aInfo["ipfailures"] = lambda jail=self._jail: \
|
||||
jail.database.getBansMerged(ip=ip).getAttempt()
|
||||
aInfo["ipjailfailures"] = lambda jail=self._jail: \
|
||||
|
|
|
@ -795,8 +795,10 @@ class FileContainer:
|
|||
try:
|
||||
line = line.decode(self.getEncoding(), 'strict')
|
||||
except UnicodeDecodeError:
|
||||
logSys.warning("Error decoding line from '%s' with '%s': %s" %
|
||||
(self.getFileName(), self.getEncoding(), `line`))
|
||||
logSys.warning(
|
||||
"Error decoding line from '%s' with '%s'. Continuing "
|
||||
" to process line ignoring invalid characters: %r" %
|
||||
(self.getFileName(), self.getEncoding(), line))
|
||||
if sys.version_info >= (3,): # In python3, must be decoded
|
||||
line = line.decode(self.getEncoding(), 'ignore')
|
||||
return line
|
||||
|
|
Loading…
Reference in New Issue