base: HEIM_JSON_F_TRY_DECODE_DATA cannot work
The idea with HEIM_JSON_F_TRY_DECODE_DATA is that on parsing of JSON texts, if we find a base64-encoded string, decode it. But a lot of strings that aren't base64-encoded can be decoded anyways, leaving a mess. Insted we should -in a future commit- implement this only for the string values of "heimdal-type-data-76d7fca2-d0da-4b20-a126-1a10f8a0eae6" names in singleton objects.
This commit is contained in:
@@ -525,13 +525,6 @@ test_json(void)
|
||||
"wrong data NUL");
|
||||
o2 = heim_json_copy_serialize(o, 0, NULL);
|
||||
heim_assert(o2 != NULL, "data not serialized");
|
||||
o3 = heim_json_create(heim_string_get_utf8(o2), 10,
|
||||
HEIM_JSON_F_TRY_DECODE_DATA, NULL);
|
||||
heim_assert(o3 != NULL, "data not accepted");
|
||||
heim_assert(heim_data_get_length(o3) == 1, "wrong data length");
|
||||
heim_assert(((const char *)heim_data_get_ptr(o3))[0] == '\0',
|
||||
"wrong data NUL");
|
||||
heim_release(o3);
|
||||
heim_release(o2);
|
||||
heim_release(o);
|
||||
|
||||
|
Reference in New Issue
Block a user