Module: check_mk
Branch: master
Commit: 9aa3eeccb436dc17d9007054c519b52910da2073
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9aa3eeccb436dc…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Dec 18 14:56:44 2015 +0100
#2821 FIX WATO rule based notifications: Validate regular expression for service
conditions
The rule based notification conditions <i>Match only the following
services</i> and
<i>Exclude the following services<i> were unabled to detect invalid regular
expression.
An invalid regular expression causes an exception during the notification processing,
which ultimately leads to the loss of any notification running through this broken rule.
---
.werks/2821 | 13 +++++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 4 ++--
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/.werks/2821 b/.werks/2821
new file mode 100644
index 0000000..9deee50
--- /dev/null
+++ b/.werks/2821
@@ -0,0 +1,13 @@
+Title: WATO rule based notifications: Validate regular expression for service conditions
+Level: 1
+Component: notifications
+Compatible: compat
+Version: 1.2.7i4
+Date: 1450446173
+Class: fix
+
+The rule based notification conditions <i>Match only the following
services</i> and
+<i>Exclude the following services<i> were unabled to detect invalid regular
expression.
+
+An invalid regular expression causes an exception during the notification processing,
+which ultimately leads to the loss of any notification running through this broken rule.
diff --git a/ChangeLog b/ChangeLog
index 5aacd49..dcf7160 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -226,6 +226,7 @@
* 2728 FIX: Removed debug notification script (was not executable)...
* 2843 FIX: Hanging notification scripts could prevent all other notifications...
* 2815 FIX: Notification scripts: Fixed missing environment variables...
+ * 2821 FIX: WATO rule based notifications: Validate regular expression for service
conditions...
Event Console:
* 2733 Visibility of Event Console events more flexible now...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 7040032..14202cc 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -7007,7 +7007,7 @@ def generic_rule_match_conditions():
help = _("Specify a list of regular expressions that must match the
<b>beginning</b> of the "
"service name in order for the rule to match. Note: Host
notifications never match this "
"rule if this option is being used."),
- valuespec = TextUnicode(size = 32),
+ valuespec = RegExpUnicode(size = 32),
orientation = "horizontal",
allow_empty = False,
empty_text = _("Please specify at least one service regex. Disable the
option if you want to allow all services."),
@@ -7016,7 +7016,7 @@ def generic_rule_match_conditions():
( "match_exclude_services",
ListOfStrings(
title = _("Exclude the following services"),
- valuespec = TextUnicode(size = 32),
+ valuespec = RegExpUnicode(size = 32),
orientation = "horizontal",
)
),