sebres
e392f510e2
fix sporadic time-related (multi-threaded) assertion errors (message was not found in the log).
6 years ago
Sergey G. Brester
ee207d8c31
Merge pull request #2151 from benrubson/merge
...
Apache SNI error / misredirect attempts rules are combined in one regex
6 years ago
Ben RUBSON
77b35b8db7
Improvement
6 years ago
sebres
e2a255d104
fixed typo in comments by "ignoreself" parameter
6 years ago
sebres
6ad9bb56a0
Update ChangeLog
6 years ago
sebres
e995d5a0b6
filter.d/freeswitch.conf: provide mode parameter, allows to avoid matching of messages like `auth challenge (REGISTER)` (see gh-2163) (currently `extra` as default to be backwards-compatible), see comments in filter how to set it to mode `normal`.
6 years ago
sebres
bc2dbacc9a
filter.d/freeswitch.conf: provide compatibility for log-format from gh-2193:
...
- extended with new default date-pattern `^(?:%%Y-)?%%m-%%d[ T]%%H:%%M:%%S(?:\.%%f)?` to cover
`YYYY-mm-dd HH:MM::SS.ms` as well as `mm-dd HH:MM::SS.ms` (so year is optional);
- more optional arguments in log-line (so accept [WARN] as well as [WARNING] and optional [SOFIA] hereafter);
6 years ago
Yaroslav Halchenko
ae359f6f05
BF: $value not $code
6 years ago
Yaroslav Halchenko
298f2c066a
BF: account that now code 255 is the one to say "it is Ok, we are already running/stopped"
6 years ago
Yaroslav Halchenko
f323eceec7
BF: debian-initd, exit with exit code in logend_msg_wrapper
...
and do it unconditionally on the verbosity level
6 years ago
Yaroslav Halchenko
d9b9b6ba22
RF: exit codes are positive, so exit(255) instead of exit(-1)
6 years ago
sebres
22d37cdce2
sshd: fixed failregex for ddos (resp. aggressive) mode, to cover "authenticating user" case in log-message:
...
Connection closed by authenticating user root 192.0.2.10 ... [preauth]
tests extended (also with few injection tries).
closes gh-2185.
6 years ago
sebres
64d9e164cf
extends samples test-case factory to see the matched regex number and expression in assert message (helps if some similar regexp's available in filter)
6 years ago
sebres
d92381aaa9
fail2ban-regex: ignore lines having not empty match of `<F-NOFAIL>` from failregex (not a failure, so count as ignored and not as matched).
6 years ago
sebres
8fe07e29ad
filter.d/dovecot.conf: failregex enhancement to catch disconnected with "proxy dest auth failed";
...
closes gh-2184
6 years ago
sebres
94ffd00328
fixes initialization bug if sys.stdout.encoding is None (closes gh-2177).
6 years ago
Sergey G. Brester
cc321b78da
Merge pull request #2176 from sebres/ignore-cache
...
Introduces cache for ignore-facilities (for `ignoreip`, `ignoreself` and `ignorecommand`)
6 years ago
sebres
f8f01d5ab7
introduced new option `ignorecache` to improve performance of ignore failure check (using caching of `ignoreip`, `ignoreself` and `ignorecommand`)
6 years ago
sebres
9b6d17d07e
extend `ignorecommand` to use actions-similar replacement (ticket-based now, so capable to interpolate all possible tags)
6 years ago
Sergey G. Brester
11c1bf0149
Update ChangeLog
6 years ago
Daniel Dương
a719ba81e9
Fix cymru reference link
6 years ago
sebres
d9b9bb5f40
Merge pull request #2125 from jodlajodla/0.11 (rebased)
6 years ago
sebres
1e44b3f085
systemd no cover (currently unsupported by travis)
6 years ago
Jan Sušnik
54a04b3a6a
Fixed data type of journal flags from str to int
6 years ago
Jan Sušnik
df33322f9f
Added test to prove bug when specifying journal flags to systemd backend
6 years ago
Sergey G. Brester
75330568d9
Merge pull request #2168 from dpavlin/dovecot-add-F-USER
...
dovecot: collect F-USER and variants
6 years ago
sebres
f7962469a9
Merge pull request #2173 from mattsta/fix/findtime-backsearch-on-file-load (rebased)
6 years ago
sebres
1eb93e2556
filter.py: repair start-time of initial seek to time (regardless the position of `findtime` option in config);
...
jailreader.py: additionally relocate the option `logpath` after all log-related data (backend, date-pattern, etc) that may be needed by the first usage (gh-2173).
Thanks to Matt Stancliff (mattsta)
6 years ago
Matt Stancliff
00a0e98041
Load logpath only after findtime is configured
...
When new log paths are configured, their start offset is immediately determined
by a filter searching for (now - findTime).
But, since findTime is configured *after* the log is loaded and
searched, logs are only searched back by the default 10 minute findTime,
regardless of user configuration of jail settings.
So, findTime must be configured before logpath or else the default findtime
is used, which ignores any findtime time defined by the user.
This fixes new reads on startup for actual log files. The systemd filter
always performed as expected due to being setup after the jail's
findtime config submission.
6 years ago
sebres
857d6954c4
Merge pull request #2171 from sebres/0.10-fix-decoding-issues
6 years ago
sebres
d0945120bf
ChangeLog
6 years ago
sebres
73e89df912
amend to bcf557990e15922aff22485cc86ddd2fcf41b796: wrong logging syntax will not throw an error anymore (logged now, as logging is safe)
6 years ago
sebres
bcf557990e
relocate exception-safe logging from database json-handler to common logger handling, using injection on _log-method of Logger class;
...
additionally provides more info if handler/conversion failed (with double protection inside catch-case);
tests/utils.py: log handler "_MemHandler" of LogCaptureTestCase fixed now to be safe also (test-cases only);
tests/misctestcase.py: the safe logging of all possible constellations is covered in testSafeLogging now.
6 years ago
sebres
06f2130575
typo/indent fix (no functional changes)
6 years ago
sebres
6ce67a6d21
coverage
6 years ago
sebres
bd54d472b3
extend test-cases to check the database is still operable (not locked) after all the errors during the simulation
6 years ago
sebres
3be82a9ce9
coverage
7 years ago
sebres
5a4b47464b
a bit optimized helpers
7 years ago
sebres
7dffa7a2a1
coverage related, after default encoding change
7 years ago
sebres
c81de46d21
remove some no cover pragma's - covered now
7 years ago
sebres
48c2cbfa0b
improve failure-message of assertNotLogged in case of single match given
7 years ago
sebres
7c9146feb3
ticket can contains bytes now (if deserialized from json by py3.x)
7 years ago
sebres
930cc6c8f1
improve adapter/converter handlers working on invalid characters in sense of json and/or sqlite-database;
...
both should be additionally exception-safe, so avoid possible errors in log-handlers (concat, str. conversion, etc);
test cases extended to cover any possible variants (invalid chars in unicode, bytes, str + unterminated char-sequence) with both cases (with replace of chars, with and without errors inside adapter-handlers).
7 years ago
sebres
85fd1854bc
minimize influence of implicit conversions errors (between unicode, bytes and str), provide new universal helper `uni_string`, which uses safe explicit conversion to string (also if default encoding is ascii); avoid conversion errors on wrong-chars by replace tags.
7 years ago
Dobrica Pavlinusic
6f1e789f31
dovecot: collect F-USER and variants
...
We are prefering ruser= if availble because this are credentials
presented to dovecot from remote client.
7 years ago
sebres
227550684a
**interim** try to fix several conversion errors
7 years ago
sebres
79350e916e
fixes issue with wrong-chars in string items of CallingMap by its representation, additionally don't calculate values implicitly (may be unexpected for some constellations resp. too slow in DEBUG)
7 years ago
sebres
2f5059ebfb
test-cases: rewrite dirty-read algorithm of _MemHandler to avoid sporadic reset of dirty flag by too fast logging;
...
prevents sporadic tests-failures (too often by pypy) if waiting for some log-message (that was mistakenly swallowed up from cache-mechanism, so was logged but "dirty" flag is already reset)
7 years ago
sebres
8cbe1e6b13
Merge pull request #2155
7 years ago
cheese1
43db4411de
small typo
7 years ago