From 859aad793dec3ebd52d4bd01ec7cd0ae2125589a Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 14 Jul 2015 13:28:54 -0400 Subject: [PATCH] Collapse 'acknowledge' parameter to boolean, 'False' meaning False When a client submits non-boolean data for acknowledge, coerce it into boolean in some reasonable way. --- confluent_server/confluent/messages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confluent_server/confluent/messages.py b/confluent_server/confluent/messages.py index c60a6e76..b12a0e31 100644 --- a/confluent_server/confluent/messages.py +++ b/confluent_server/confluent/messages.py @@ -693,7 +693,7 @@ class AlertDestination(ConfluentMessage): class InputAlertDestination(ConfluentMessage): valid_alert_params = { - 'acknowledge': lambda x: x, + 'acknowledge': lambda x: False if type(x) in (unicode,str) and x.lower() == 'false' else bool(x), 'ip': lambda x: x, 'retries': lambda x: int(x) }