[icinga-checkins] icinga.org: icinga2/support/2.2: Don't validate strings in the JSON parser

git at icinga.org git at icinga.org
Fri Nov 21 08:26:52 CET 2014


Module: icinga2
Branch: support/2.2
Commit: 95e86cee9a05f40c4cf8369829eea39d7ed743c6
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=95e86cee9a05f40c4cf8369829eea39d7ed743c6

Author: Gunnar Beutner <gunnar at beutner.name>
Date:   Thu Nov 20 10:09:13 2014 +0100

Don't validate strings in the JSON parser

fixes #7730

---

 lib/base/json.cpp |    1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/base/json.cpp b/lib/base/json.cpp
index fb72a57..3eab027 100644
--- a/lib/base/json.cpp
+++ b/lib/base/json.cpp
@@ -340,6 +340,7 @@ Value icinga::JsonDecode(const String& data)
 	handle = yajl_alloc(&callbacks, &cfg, NULL, &context);
 #else /* YAJL_MAJOR */
 	handle = yajl_alloc(&callbacks, NULL, &context);
+	yajl_config(handle, yajl_dont_validate_strings, 1);
 #endif /* YAJL_MAJOR */
 
 	yajl_parse(handle, reinterpret_cast<const unsigned char *>(data.CStr()), data.GetLength());



More information about the icinga-checkins mailing list