mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-08-28 12:24:22 +00:00
BF+ENH: added %m-%d-%Y pattern + do not add %Y for Feb 29 fix if already present in the pattern
although %m-%d-%Y is ambioius with %d-%m-%Y it comes after so it should not be too dangerous (i.e. in upcoming days having smth like 02-01 should work as before matching first one first) and proper fix to select between the two should follow some time soon
This commit is contained in:
parent
10729f96b9
commit
b257be4cd1
3 changed files with 21 additions and 4 deletions
|
|
@ -117,6 +117,12 @@ class DateDetector:
|
|||
template.setRegex("\d{2}-\d{2}-\d{4} \d{2}:\d{2}:\d{2}")
|
||||
template.setPattern("%d-%m-%Y %H:%M:%S")
|
||||
self.__templates.append(template)
|
||||
# 01-27-2012 16:22:44.252
|
||||
template = DateStrptime()
|
||||
template.setName("Month-Day-Year Hour:Minute:Second[.Millisecond]")
|
||||
template.setRegex("\d{2}-\d{2}-\d{4} \d{2}:\d{2}:\d{2}")
|
||||
template.setPattern("%m-%d-%Y %H:%M:%S")
|
||||
self.__templates.append(template)
|
||||
# TAI64N
|
||||
template = DateTai64n()
|
||||
template.setName("TAI64N")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue