Don't validate strings in the JSON parser

fixes #7730
This commit is contained in:
Gunnar Beutner 2014-11-20 10:09:13 +01:00
parent 6cadde82bd
commit 5321bc4643
1 changed files with 1 additions and 0 deletions

View File

@ -340,6 +340,7 @@ Value icinga::JsonDecode(const String& data)
handle = yajl_alloc(&callbacks, &cfg, NULL, &context); handle = yajl_alloc(&callbacks, &cfg, NULL, &context);
#else /* YAJL_MAJOR */ #else /* YAJL_MAJOR */
handle = yajl_alloc(&callbacks, NULL, &context); handle = yajl_alloc(&callbacks, NULL, &context);
yajl_config(handle, yajl_dont_validate_strings, 1);
#endif /* YAJL_MAJOR */ #endif /* YAJL_MAJOR */
yajl_parse(handle, reinterpret_cast<const unsigned char *>(data.CStr()), data.GetLength()); yajl_parse(handle, reinterpret_cast<const unsigned char *>(data.CStr()), data.GetLength());