prewikka/master: Fix inline filtering problem for event name with start/ending space

[email protected] Wed, 24 Feb 2010 10:41:25 +0100 (CET)
Newsgroups gmane.comp.security.ids.prelude.cvs
Message-ID <[email protected]>
commit 830ec9fbe0bf8d121dc93bcb57f7d7f3a5344536
Author: Yoann Vandoorselaere <[email protected]>
Date:   Tue Feb 23 16:50:32 2010 +0100

    Fix inline filtering problem for event name with start/ending space
    
    When performing an exact comparison of the filter input, do not strip
    space from the start and the end of the input, since it happen that
    some sensor put a space at the end of the string. Closes #371.


========================================

 prewikka/views/alertlisting.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

========================================

diff --git a/prewikka/views/alertlisting.py b/prewikka/views/alertlisting.py
index 7ab1e01..c7b270f 100644
--- a/prewikka/views/alertlisting.py
+++ b/prewikka/views/alertlisting.py
@@ -891,11 +891,11 @@ class AlertListing(MessageListing, view.View):
         return out, found
 
     def _adjustFilterValue(self, op, value):
-        value = value.strip()
-
         if op != "<>*" and op != "<>":
             return value
 
+        value = value.strip()
+
         value, has_wildcard = self._criteriaValueFind(value, ["*"])
         if has_wildcard:
             return value
_______________________________________________
Prelude-cvslog site list
[email protected]
http://lists.prelude-technologies.com/mailman/listinfo/prelude-cvslog