Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-27426

validateBSON should assert that Array elements have indexes from 0...n

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Networking
    • Labels:
    • Sprint:
      Platforms 2017-12-18, Platforms 2018-01-01, Platforms 2018-01-15, Security 2020-02-10, Security 2020-02-24, Security 2020-03-09, Security 2020-03-23

      Description

      According to the BSON spec, "The document for an array is a normal BSON document with integer values for the keys, starting with 0 and continuing sequentially". Currently, we validate BSON in validateBSON. validateBSON treats arrays exactly like nested BSON. We should add an additional check, which verifies that the first index is '0', and each subsequent key is sequential.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              spencer.jackson Spencer Jackson
              Reporter:
              spencer.jackson Spencer Jackson
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: