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:
Nicolas Williams
2022-10-01 17:53:11 -05:00
parent ed4b50720d
commit 1429814eda
2 changed files with 0 additions and 36 deletions

View File

@@ -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);