mirror of https://github.com/fail2ban/fail2ban
ENH: date for apache-2.4 - adds milliseconds
parent
62c13c15d6
commit
ced271b908
|
@ -38,6 +38,7 @@ ver. 0.8.11 (2013/XX/XXX) - loves-unittests
|
|||
Daniel Black
|
||||
* filter.d/exim-spam.conf -- a splitout of exim's spam regexes
|
||||
with additions for greater control over filtering spam.
|
||||
* add date expression for apache-2.4 - milliseconds
|
||||
- Enhancements:
|
||||
Daniel Black
|
||||
* filter.d/{asterisk,assp,dovecot,proftpd}.conf -- regex hardening
|
||||
|
|
|
@ -46,7 +46,13 @@ class DateDetector:
|
|||
def addDefaultTemplate(self):
|
||||
self.__lock.acquire()
|
||||
try:
|
||||
# asctime
|
||||
# asctime with subsecond
|
||||
template = DateStrptime()
|
||||
template.setName("WEEKDAY MONTH Day Hour:Minute:Second[.subsecond] Year")
|
||||
template.setRegex("\S{3} \S{3}\s{1,2}\d{1,2} \d{2}:\d{2}:\d{2}\.\d+ \d{4}")
|
||||
template.setPattern("%a %b %d %H:%M:%S.%f %Y")
|
||||
self._appendTemplate(template)
|
||||
# asctime without no subsecond
|
||||
template = DateStrptime()
|
||||
template.setName("WEEKDAY MONTH Day Hour:Minute:Second Year")
|
||||
template.setRegex("\S{3} \S{3}\s{1,2}\d{1,2} \d{2}:\d{2}:\d{2} \d{4}")
|
||||
|
|
Loading…
Reference in New Issue