mirror of https://github.com/fail2ban/fail2ban
small amend to 0f27a8add8
- datedetector, strptime: token `%Z` recognizes all known zone abbreviation besides Z, GMT, UTC correctly, if it is matching (`%z` remains unchanged for backwards-compatibility, see comment in code); test cases fixed (PDT zone will be found now).
parent
0f27a8add8
commit
b8e8a87ee9
|
@ -238,7 +238,7 @@ def reGroupDictStrptime(found_dict, msec=False, default_tz=None):
|
||||||
z = val
|
z = val
|
||||||
if z in ("Z", "UTC", "GMT"):
|
if z in ("Z", "UTC", "GMT"):
|
||||||
tzoffset = 0
|
tzoffset = 0
|
||||||
elif key == 'z':
|
else:
|
||||||
tzoffset = zone2offset(z, 0); # currently offset-based only
|
tzoffset = zone2offset(z, 0); # currently offset-based only
|
||||||
|
|
||||||
# Fail2Ban will assume it's this year
|
# Fail2Ban will assume it's this year
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Previous version --
|
# Previous version --
|
||||||
# failJSON: { "time": "2005-04-16T21:05:29", "match": true , "host": "69.93.127.111" }
|
# failJSON: { "time": "2005-04-17T06:05:29", "match": true , "host": "69.93.127.111" }
|
||||||
[PDT Apr 16 21:05:29] error : Warning: Client '69.93.127.111' supplied unknown user 'foo' accessing monit httpd
|
[PDT Apr 16 21:05:29] error : Warning: Client '69.93.127.111' supplied unknown user 'foo' accessing monit httpd
|
||||||
# failJSON: { "time": "2005-04-16T20:59:33", "match": true , "host": "97.113.189.111" }
|
# failJSON: { "time": "2005-04-17T05:59:33", "match": true , "host": "97.113.189.111" }
|
||||||
[PDT Apr 16 20:59:33] error : Warning: Client '97.113.189.111' supplied wrong password for user 'admin' accessing monit httpd
|
[PDT Apr 16 20:59:33] error : Warning: Client '97.113.189.111' supplied wrong password for user 'admin' accessing monit httpd
|
||||||
|
|
||||||
# Current version -- corresponding "https://bitbucket.org/tildeslash/monit/src/6905335aa903d425cae732cab766bd88ea5f2d1d/src/http/processor.c?at=master&fileviewer=file-view-default#processor.c-728"
|
# Current version -- corresponding "https://bitbucket.org/tildeslash/monit/src/6905335aa903d425cae732cab766bd88ea5f2d1d/src/http/processor.c?at=master&fileviewer=file-view-default#processor.c-728"
|
||||||
|
|
Loading…
Reference in New Issue