Module: check_mk
Branch: master
Commit: 098edee947e0c8ea1d1db8229d8813770b0fe9d4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=098edee947e0c8…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Dec 16 11:07:21 2016 +0100
4150 FIX Avoid exception in host search when searching for empty texts
Change-Id: I1179c3d0b434f7a07695c5173b022f40de73dca8
---
.werks/4150 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/watolib.py | 2 +-
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/.werks/4150 b/.werks/4150
new file mode 100644
index 0000000..5150b21
--- /dev/null
+++ b/.werks/4150
@@ -0,0 +1,9 @@
+Title: Avoid exception in host search when searching for empty texts
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.4.0i3
+Date: 1481882827
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index adca56c..09d6409 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -122,6 +122,7 @@
* 4133 FIX: Do not suppress site specific global issues during WATO activation
* 4134 FIX: Unified ineffective rulesets view with other ruleset list views
* 3999 FIX: Added core restart note to bulk host rename page
+ * 4150 FIX: Avoid exception in host search when searching for empty texts
Notifications:
* 4042 FIX: Fix missing From address in synchronous SMTP notifications...
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index ed43001..bb1dbe7 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -2582,7 +2582,7 @@ class TextAttribute(Attribute):
def host_attribute_matches(crit, value):
- if crit[0] == "~":
+ if crit and crit[0] == "~":
# insensitive infix regex match
return re.search(crit[1:], value, re.IGNORECASE) != None
else: