2 ms·
The 2nd version made it insecure, as scalars are not delimited anymore, and MITM or version mismatches can change the value. schmorp wrote this: > For example
by rurban 7y ago
The 2nd version made it insecure, as scalars are not delimited anymore, and MITM or version mismatches can change the value.
schmorp wrote this:
> For example, imagine you have two banks communicating, and on one side, the JSON coder gets upgraded. Two messages, such as 10 and 1000 might then be confused to mean 101000, something that couldn't happen in the original JSON, because neither of these messages would be valid JSON.
> If one side accepts these messages, then an upgrade in the coder on either side could result in this becoming exploitable.
The 3rd version was a joke, because the outstanding problems were not addressed at all, and removing BOM support for the 4 other encodings is just a joke. First, you cannot remove a feature once you explicitly allowed it, esp. since it's a minor and an almost unused one.
And remember that http://seriot.ch/parsing_json.php http://seriot.ch/parsing_json.php was already published then, and the most egregious spec omissions had been known for years already. such as undefined order of keys, or undefined if duplicate keys are allowed. Allowing unsorted keys is also a minor security risk, as it exposes the internal hash order, which can lead to hash seed calculation.