mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-09-21 07:38:24 +00:00
ENH: strip CR and LF while analyzing the lines (processLine) (Close #202)
This should allow to resolve issues with logs written in MS-DOS fashion, e.g. with daemontools See https://github.com/fail2ban/fail2ban/issues/202\#issuecomment-17393613
This commit is contained in:
parent
2b1e19933f
commit
6fef85ff2d
2 changed files with 24 additions and 5 deletions
|
|
@ -290,6 +290,7 @@ class Filter(JailThread):
|
|||
l = line.decode('utf-8')
|
||||
except UnicodeDecodeError:
|
||||
l = line
|
||||
l = l.rstrip('\r\n')
|
||||
timeMatch = self.dateDetector.matchTime(l)
|
||||
if timeMatch:
|
||||
# Lets split into time part and log part of the line
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue