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

git at icinga.org git at icinga.org
Thu Nov 20 11:02:35 CET 2014


Module: icinga2
Branch: feature/codegen
Commit: 5321bc46439a0daa6b47a15a2e2b60aa383f21f0
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=5321bc46439a0daa6b47a15a2e2b60aa383f21f0

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