Subject: [Cbor] Making CBOR parsing more rigorous

From: Jeffrey Yasskin <[email-masked]>
Date: Fri, 23 Mar 2018 17:04:11 +0000

I have a collection of PRs against CBORbis to try to make parsing more
rigorous, to deal with objections from web spec owners like
https://github.com/mozilla/standards-positions/issues/29#issuecomment-334376573.
I haven't yet run these changes by a web spec person to make sure they're
complete, so there might be another set of PRs coming after these are in.

https://github.com/cbor-wg/CBORbis/pull/17 has a lot of changes to define
which kinds of CBOR parsers need to detect which errors in the encoded
data, and which errors are recoverable.

The basic idea is to classify encoded CBOR data into valid,
invalid-but-well-formed, recoverably-ill-formed, and fatally-ill-formed
categories, and then use that in this and derived specifications to
describe parser behavior precisely.

A question came up whether we can give an item's "unsigned integer" a
better name. Any ideas?

https://github.com/cbor-wg/CBORbis/pull/18 defines when the known kinds of
tagged items are valid.

Let me know what you think. Approving PRs is probably helpful to the
editors even if you have no comments.

Thanks,
Jeffrey