From: <los...@us...> - 2007-06-25 21:52:55
|
Revision: 591 http://svn.sourceforge.net/fail2ban/?rev=591&view=rev Author: lostcontrol Date: 2007-06-25 14:52:58 -0700 (Mon, 25 Jun 2007) Log Message: ----------- - Expand <HOST> in ignoreregex. Thanks to Yaroslav Halchenko Modified Paths: -------------- trunk/CHANGELOG trunk/server/failregex.py trunk/server/regex.py Modified: trunk/CHANGELOG =================================================================== --- trunk/CHANGELOG 2007-06-25 21:43:44 UTC (rev 590) +++ trunk/CHANGELOG 2007-06-25 21:52:58 UTC (rev 591) @@ -12,6 +12,7 @@ - Removed Python 2.4 code. Need more testing - Made interactive mode optional in fail2ban-client - Fixed vulnerability in sshd.conf. Thanks to Daniel B. Cid +- Expand <HOST> in ignoreregex. Thanks to Yaroslav Halchenko ver. 0.8.0 (2007/05/03) - stable ---------- Modified: trunk/server/failregex.py =================================================================== --- trunk/server/failregex.py 2007-06-25 21:43:44 UTC (rev 590) +++ trunk/server/failregex.py 2007-06-25 21:52:58 UTC (rev 591) @@ -40,9 +40,7 @@ # avoid construction of invalid object. # @param value the regular expression - def __init__(self, value): - # Replace "<HOST>" with default regular expression for host. - regex = value.replace("<HOST>", "(?:::f{4,6}:)?(?P<host>\S+)") + def __init__(self, regex): # Initializes the parent. Regex.__init__(self, regex) # Check for group "host" Modified: trunk/server/regex.py =================================================================== --- trunk/server/regex.py 2007-06-25 21:43:44 UTC (rev 590) +++ trunk/server/regex.py 2007-06-25 21:52:58 UTC (rev 591) @@ -42,6 +42,9 @@ def __init__(self, regex): self._matchCache = None + # Perform shortcuts expansions + # Replace "<HOST>" with default regular expression for host. + regex = regex.replace("<HOST>", "(?:::f{4,6}:)?(?P<host>\S+)") if regex.lstrip() == '': raise RegexException("Cannot add empty regex") try: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |