Skip to content

6.2.0

Choose a tag to compare

@github-actions github-actions released this 02 Nov 10:28
· 6 commits to master since this release
  • Added the strict_hashable_types parameter to CBORDecoder, load and loads which, when enabled, restricts map keys and set elements to text strings and byte strings in order to prevent denial-of-service attacks via hash collisions (GHSA-p6xp-9h6j-r278)
  • Documented decoding concatenated CBOR objects with EOF checks between objects (#30; PR by @arindamsikder)
  • Fixed CBOREncoder.encode_to_bytes() sharing the string reference namespace of the enclosing encode operation when called from a default hook (#356; PR by @17krishna8)
  • Fixed the encoder writing the repr() of a bytes regular expression pattern (tag 35) instead of the pattern itself, so the regular expression decoded back as the text pattern b'...' and no longer matched the same input (#355; PR by @sahvx655-wq)
  • Fixed shared references (tag 29) allowing the decoder to construct object graphs nested deeper than max_depth, which could crash the interpreter with a segmentation fault when such an object was hashed (as a map key or set member) (GHSA-55vx-2phh-7grr)
  • Fixed mission conversion of date values (tags 100 and 1004) to JSON as ISO formatted strings (#358; PR by @jadenfix)
  • Fixed a PanicException on Python 3.10 when decoding a string-form datetime (tag 0) whose fractional seconds part contains a multi-byte Unicode numeric character, as the microsecond padding treated those as digits and then truncated the part on a byte index inside one of them (#354; PR by @sahvx655-wq)
  • Fixed the decoder accepting a set (tag 258) whose payload is not an array, folding a text string, byte string or map into a set of its characters, bytes or keys instead of rejecting it (#352; PR by @sahvx655-wq)
  • Fixed the decoder accepting a non-integer exponent or mantissa in a decimal fraction (tag 4) or a bigfloat (tag 5) (#350; PR by @sahvx655-wq)