Commit Graph

3038 Commits (1fb867b839c3f8cd9931371dffa59aab545a437d)

Author SHA1 Message Date
Yaroslav Halchenko abd56dbedf Merge branch 'master' into 0.9
* master: (26 commits)
  DOC: added a note that coverage script is python-coverage on Debian systems
  Fixed typos
  Added additional Transmitter tests, and some associated fixes
  TODO: test filters/examples files
  add corresponding ChangeLog entry
  do catch all exception
  ENH: typo + head -1 has been deprecated for 10+ years.
  ENH: add help command
  BF: allow more than single word for command action[start,stop,ban,unban,check] and for setcinfo too
  BF: general Exception catch was excessive. Only IOError and OSError are possible and has different meanings
  Add development documentation and framework for code coverage measurement
  FSF address changes missing from previous
  refresh generated manpages (since 0.8.2 state)
  Downgrade log rotation detection message to DEBUG level from INFO. Closes: gh-129
  BF: do not shutdown logging until all jails stop -- so move into Server.quit()
  BF: safeguard closing of log handlers + close in reverse order
  Added transmitter get cinfo option for action
  Fix for missing value in transmitter delaction
  Rewrite and enable server testcase for Transmitter
  ENH: adding more of diagnostic messages into -client while starting the daemon
  ...
2013-03-12 20:48:09 -04:00
Steven Hiscocks d4362859ef Added testcase for csocket and asyncserver 2013-03-11 17:22:57 +00:00
sebres b6bb2f88c1 invalid date recognition, irregular because of sorting template list, now via setRegex 2013-03-11 13:52:31 +01:00
Yaroslav Halchenko be42522bba Merge branch 'transmitter-testcase' of https://github.com/kwirk/fail2ban
* 'transmitter-testcase' of https://github.com/kwirk/fail2ban:
  Added additional Transmitter tests, and some associated fixes
2013-03-10 21:23:04 -04:00
Yaroslav Halchenko cabbc0fd96 DOC: added a note that coverage script is python-coverage on Debian systems 2013-03-10 21:21:27 -04:00
Yaroslav Halchenko 5e5eaaf838 Merge pull request #134 from grooverdan/misc-fixes
BF: fail2ban client can't handle multi word setcinfo or action[*] values
2013-03-10 18:01:17 -07:00
Yaroslav Halchenko 5163f02e92 Merge pull request #138 from pborreli/typos
Those were not the typos but an alternative self-expression ;-)   Thanks @pborreli
2013-03-10 17:58:51 -07:00
Pascal Borreli a2b29b4875 Fixed typos 2013-03-10 22:05:33 +00:00
Steven Hiscocks 4bbbc07872 Added additional Transmitter tests, and some associated fixes
This includes some tweaks such that errors are raised for certain
commands
2013-03-10 14:55:39 +00:00
Yaroslav Halchenko a6cf3246d0 Merge pull request #135 from grooverdan/dev-doco-2
Dev doco 2
2013-03-10 06:31:29 -07:00
Daniel Black d0d89b4321 TODO: test filters/examples files 2013-03-10 17:47:52 +11:00
Daniel Black 8b91b58e2d add corresponding ChangeLog entry 2013-03-10 17:47:41 +11:00
Daniel Black 23bbc60b1c do catch all exception 2013-03-10 17:10:40 +11:00
Yaroslav Halchenko b03e046370 Merge pull request #133 from grooverdan/development-code-coverage
coverage pragma comments, improved documentation for the developers
2013-03-09 21:30:05 -08:00
Daniel Black a0f088be25 ENH: typo + head -1 has been deprecated for 10+ years. 2013-03-10 16:28:45 +11:00
Daniel Black 7cd6dab7f0 ENH: add help command 2013-03-10 15:45:54 +11:00
Daniel Black f0610c01d5 BF: allow more than single word for command action[start,stop,ban,unban,check] and for setcinfo too 2013-03-10 15:29:48 +11:00
Daniel Black c8c7b0b984 BF: general Exception catch was excessive. Only IOError and OSError are possible and has different meanings 2013-03-10 15:29:27 +11:00
Daniel Black 3665e6dc44 Add development documentation and framework for code coverage measurement 2013-03-10 15:18:42 +11:00
Daniel Black 00ad4d56a7 FSF address changes missing from previous 2013-03-10 15:18:09 +11:00
Yaroslav Halchenko 6e77427516 refresh generated manpages (since 0.8.2 state) 2013-03-07 13:03:49 -05:00
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}".
2013-03-05 00:02:39 +01:00
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
2013-03-01 19:57:56 -05:00
Steven Hiscocks a4a24048d4 Minor tweaks to fail2ban-regex for encoding 2013-02-27 18:31:47 +00:00
Steven Hiscocks 578d9bed1b Added ability to set log file encoding with fail2ban-regex 2013-02-27 18:13:22 +00:00
Steven Hiscocks 66367876bb Add ability to set log encoding for jail 2013-02-27 18:09:55 +00:00
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
2013-02-25 22:45:16 +00:00
Steven Hiscocks 7e1819ed65 Fix incorrect exit code from fail2ban-2to3 2013-02-24 19:34:05 +00:00
Steven Hiscocks 184e0eccb6 Remove redundant reassignment of variable 2013-02-24 19:28:41 +00:00
Steven Hiscocks 78d86bc38d Minor typo in fail2ban-testcases-all-python3 2013-02-24 19:24:07 +00:00
Steven Hiscocks 3a3d07ef39 Undo removal of unicode prefix in server/datetemplate.py 2013-02-24 19:22:50 +00:00
Steven Hiscocks 31b173f032 Remove functools from filter testcases for python2.4 compatibility 2013-02-24 19:13:36 +00:00
Steven Hiscocks 418d845f9b fail2ban-regex open files as utf-8 for python3 2013-02-24 18:59:07 +00:00
Steven Hiscocks dbc40d6210 Added helper scripts to carry out 2to3 and testcases on python3 2013-02-24 18:27:40 +00:00
Steven Hiscocks c8c9ed4dfc Fix DNSUtils dnsToIp not catching general socket.error exception 2013-02-24 18:13:48 +00:00
Steven Hiscocks 0dd3a81ba2 Fix use of python3 bytes in client/server socket for python2.5 2013-02-24 18:04:40 +00:00
Steven Hiscocks e28a698c0e Change filter testcases python3 open wrapper to utf-8 2013-02-24 10:11:34 +00:00
Steven Hiscocks 46a2b6e428 Fix up for client/server socket for python3 2013-02-24 10:10:15 +00:00
Steven Hiscocks 6f4da8f3c4 Remove spurious space in fail2ban-server 2013-02-24 10:04:36 +00:00
Steven Hiscocks df255063ae python3: Default open encoding for files to UTF-8
Also tidy up unicode check in processLine, which is handled by `2to3`
2013-02-23 22:20:55 +00:00
Steven Hiscocks 5d0d362e3f Ensure jail names return in alphabetical order in status
Primarily to support testing as order can switch
2013-02-23 22:06:16 +00:00
Steven Hiscocks 53be2ade86 Wrap open method to allow python3 to ignore unicode errors 2013-02-23 21:05:23 +00:00
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
2013-02-23 21:03:51 +00:00
Steven Hiscocks ad7119a3fe time.mktime argument should be tuple 2013-02-23 21:01:39 +00:00
Steven Hiscocks 2ecf34540e Change sort in datedetector to use key based comparison 2013-02-23 19:34:05 +00:00
Steven Hiscocks 99c92a56ca Check for unicode and encode before md5sum in filter 2013-02-23 18:52:10 +00:00
Steven Hiscocks c926c88ea1 Remove spurious space at start of line 2013-02-23 18:42:50 +00:00
Yaroslav Halchenko c7ab71ae1f Merge pull request #124 from kwirk/servertestcase
Rewrite and enable server testcases + fixed few bugs along the way (logging, missing assignment)
2013-02-22 06:32:11 -08:00
Steven Hiscocks 6aadd6b7dc Merge pull request #1 from yarikoptic/servertestcase
Servertestcase -- resolving issues with logging while running on python 2.4 and 2.5
2013-02-22 00:20:15 -08:00
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
2013-02-21 20:59:46 -05:00