Daniel Black
f0610c01d5
BF: allow more than single word for command action[start,stop,ban,unban,check] and for setcinfo too
12 years ago
Daniel Black
c8c7b0b984
BF: general Exception catch was excessive. Only IOError and OSError are possible and has different meanings
12 years ago
Daniel Black
3665e6dc44
Add development documentation and framework for code coverage measurement
12 years ago
Daniel Black
00ad4d56a7
FSF address changes missing from previous
12 years ago
Yaroslav Halchenko
6e77427516
refresh generated manpages (since 0.8.2 state)
12 years ago
sebres
d17b415371
invalid date recognition, irregular because of sorting template list (sometimes not reproducible by fail2ban-regex, cause will be not sorted)
...
date in following log line (from nginx) will be wrong detected:
2012/10/11 02:37:17 [error] 18434#0: *947 user "test" was not found in "/www/...", client: 192.168.1.5, ...
sometimes it is [correct] - 2012/10/11 (%Y/%m/%d) = 1349919861.71
sometimes it is [invalid] - 12/10/11 (%d/%m/%y) = 1349915838.06
and older as now - 1800 seconds (therefore will be not found)
solution: regular expression fixed, cause date in log used always after non symbol (\W) character, so r"\d{2}/\d{2}/\d{2}" will be r"(?<!\w)\d{2}/\d{2}/\d{2}".
12 years ago
Yaroslav Halchenko
59c35bc44a
Downgrade log rotation detection message to DEBUG level from INFO. Closes: gh-129
...
This message useful only when debugging problems so it is more reasonable
to have it suppressed otherwise
12 years ago
Steven Hiscocks
a4a24048d4
Minor tweaks to fail2ban-regex for encoding
12 years ago
Steven Hiscocks
578d9bed1b
Added ability to set log file encoding with fail2ban-regex
12 years ago
Steven Hiscocks
66367876bb
Add ability to set log encoding for jail
12 years ago
Steven Hiscocks
d23d365be2
Move handling of unicode decoding to FileContainer readline
...
Also print warning for unicode decode failure, leaving as str in python2
and ignoring erroneous characters in python3
12 years ago
Steven Hiscocks
7e1819ed65
Fix incorrect exit code from fail2ban-2to3
12 years ago
Steven Hiscocks
184e0eccb6
Remove redundant reassignment of variable
12 years ago
Steven Hiscocks
78d86bc38d
Minor typo in fail2ban-testcases-all-python3
12 years ago
Steven Hiscocks
3a3d07ef39
Undo removal of unicode prefix in server/datetemplate.py
12 years ago
Steven Hiscocks
31b173f032
Remove functools from filter testcases for python2.4 compatibility
12 years ago
Steven Hiscocks
418d845f9b
fail2ban-regex open files as utf-8 for python3
12 years ago
Steven Hiscocks
dbc40d6210
Added helper scripts to carry out 2to3 and testcases on python3
12 years ago
Steven Hiscocks
c8c9ed4dfc
Fix DNSUtils dnsToIp not catching general socket.error exception
12 years ago
Steven Hiscocks
0dd3a81ba2
Fix use of python3 bytes in client/server socket for python2.5
12 years ago
Steven Hiscocks
e28a698c0e
Change filter testcases python3 open wrapper to utf-8
12 years ago
Steven Hiscocks
46a2b6e428
Fix up for client/server socket for python3
12 years ago
Steven Hiscocks
6f4da8f3c4
Remove spurious space in fail2ban-server
12 years ago
Steven Hiscocks
df255063ae
python3: Default open encoding for files to UTF-8
...
Also tidy up unicode check in processLine, which is handled by `2to3`
12 years ago
Steven Hiscocks
5d0d362e3f
Ensure jail names return in alphabetical order in status
...
Primarily to support testing as order can switch
12 years ago
Steven Hiscocks
53be2ade86
Wrap open method to allow python3 to ignore unicode errors
12 years ago
Steven Hiscocks
2bb3469644
Change filter to ignore unicode errors in python3
...
Also do not try to convert unicode to unicode again for python3 and
python2
12 years ago
Steven Hiscocks
ad7119a3fe
time.mktime argument should be tuple
12 years ago
Steven Hiscocks
2ecf34540e
Change sort in datedetector to use key based comparison
12 years ago
Steven Hiscocks
99c92a56ca
Check for unicode and encode before md5sum in filter
12 years ago
Steven Hiscocks
c926c88ea1
Remove spurious space at start of line
12 years ago
Yaroslav Halchenko
c7ab71ae1f
Merge pull request #124 from kwirk/servertestcase
...
Rewrite and enable server testcases + fixed few bugs along the way (logging, missing assignment)
12 years ago
Steven Hiscocks
6aadd6b7dc
Merge pull request #1 from yarikoptic/servertestcase
...
Servertestcase -- resolving issues with logging while running on python 2.4 and 2.5
12 years ago
Yaroslav Halchenko
154aa38e3f
BF: do not shutdown logging until all jails stop -- so move into Server.quit()
...
Together with previous commit it should resolve failures with the server tests on python < 2.6
12 years ago
Yaroslav Halchenko
012264dce1
BF: safeguard closing of log handlers + close in reverse order
...
otherwise there might be "stuck" handler in the queue. and closing
exceptions can occur -- even stock logging guards in recent versions
12 years ago
Steven Hiscocks
b36835f6f0
Added transmitter get cinfo option for action
12 years ago
Steven Hiscocks
b6a68f5138
Fix for missing value in transmitter delaction
12 years ago
Steven Hiscocks
088e40c481
Rewrite and enable server testcase for Transmitter
12 years ago
Yaroslav Halchenko
a8bd9c20a0
Merge branch 'master' of git://github.com/fail2ban/fail2ban
...
* 'master' of git://github.com/fail2ban/fail2ban:
add blocking type
add example jail.conf for blocking through blackhole routes for ssh
add support for blocking through blackhole routes
12 years ago
Yaroslav Halchenko
40c5a2d996
ENH: adding more of diagnostic messages into -client while starting the daemon
12 years ago
Yaroslav Halchenko
d5ae28facf
Merge pull request #104 from gebi/t/route
...
add support for blocking through blackhole routes
12 years ago
Michael Gebetsroither
a37ed388e7
Merge pull request #1 from grooverdan/route
...
add blocking types
12 years ago
Steven Hiscocks
294f073741
Typo in default pidfile in fail2ban.conf
12 years ago
Yaroslav Halchenko
ec3080cba5
Reincarnated removed (by mistake) test for SplitAction
12 years ago
Yaroslav Halchenko
2312b1d950
ENH: made log messages while parsing files more informative + test for inaccessible file (Closes: gh-24)
12 years ago
Steven Hiscocks
ce3ab34dd8
Added ability to specify PID file
12 years ago
Yaroslav Halchenko
5c9a9b1129
Merge remote-tracking branch 'github_kwirk_fail2ban/upstream#24' into _tent/conf_d
...
Merge is done with -X ours -- since I have implemented more generic handling
for config files, including now the ones under .d/ subdirectories.
* github_kwirk_fail2ban/upstream#24 :
Fix up for warning/error for inaccessible config files
Warn if config file present but unreadable
12 years ago
Yaroslav Halchenko
9ba27353b6
NF: allow customization configuration under corresponding .d directories (Closes gh-114)
...
Additional changes:
ENH: make basedir for Config's a kwarg to the constructor
ENH: improved analysis/reporting on presence/accessibility of config
files. Got carried away and forgot about existing work done by
Steven Hiscocks in the gh-115 -- will merge it in the next
commit for the fair ack of his work
Now for any X.conf configuration file we have following ways to
provide customizations
X.local -- read after .conf (kept for backward compatibility)
X.d/ -- directory to contain additional .conf files, sorted
alphabetically, e.g
X.d/01_enable.conf - to enable the jail
X.d/02_custom_port.conf - to change the port
X could be a 'jail' or 'fail2ban' or any other configuration file in
fail2ban.
Mention that all files still must contain the corresponding sections
(most of the time duplicating it across all of them).
12 years ago
Daniel Black
47b1ee39d8
add blocking type
12 years ago
Yaroslav Halchenko
8cf006827e
BF: remove path from grep call in sendmail-whois-lines.conf Closes: gh-118
12 years ago