Open snarfed opened 3 months ago
It's a recursion depth issue: the current implementation of encoding and decoding in this library is recursive: objects with hundreds of levels of nesting, like the object you linked, exhaust the available recursion depth (which is 1000) in my machine.
Fixing this will require a non-recursive re-design of the library: it was not an issue for us until now, but I guess we'll get it done at some point in the near future :)
Thanks! Totally makes sense. Not a high priority on our end, looks like this object was specifically crafted to push the boundaries, not representative of the kinds of objects we usually see.
Hi all! First off, thank you for maintaining dag-cbor. It's great!
I came across an encoded DAG-CBOR object that makes
dag-cbor
recurse infinitely, or at least deeper than Python's default max recursion depth. Here it is, base64-encoded: bad.b64.txtHere's the stack trace snippet:
You're not the only ones, whatever JS lib @ericvolp12 is using on atproto.tools has the same problem 😆: https://atproto.tools/records?did=did%3Aplc%3A4agp2hcrps6ou4vjv7uux7dm
Thanks in advance!