Uploaded image for project: 'Rust Driver'
  1. Rust Driver
  2. RUST-2115

Allow deserializing from over-length buffers

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Rust Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, we require that the length of the buffer when parsing bson be the same as the length as reported in the serialized bson itself. We could potentially relax this to allow the input to be longer than the bson length and operate on a sub-slice; this would require some minor refactoring since we use RawDocument::from_bytes extensively for internal parsing and rely on it validating the buffer length for that, so we'd need to introduce another function that has the looser validation and use it where we want to relax the invariant (e.g. bson::from_slice).

      (Source: https://github.com/mongodb/bson-rust/issues/504)

            Assignee:
            Unassigned Unassigned
            Reporter:
            abraham.egnor@mongodb.com Abraham Egnor
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: