IDL generated parsers do not validate that the input element is a BSON array for attributes of type array<type>

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 4.5 Desired
    • Component/s: IDL
    • None
    • ALL
    • Hide
      1. Define an attribute of an object in *.idl file like below.
         
        cursors:
            description: "An array of cursor IDs to be killed."
            type: array<cursorId>
            cpp_name: cursorIds
            optional: false
        
      2. Pass an array-like object as a value of the field:
        cursors:{
         '0': 10000,
         '1': 20000
        }
        
      3. The object is successfully parsed.
      Show
      Define an attribute of an object in *.idl file like below. cursors: description: "An array of cursor IDs to be killed." type: array<cursorId> cpp_name: cursorIds optional: false Pass an array-like object as a value of the field: cursors:{ '0' : 10000, '1' : 20000 } The object is successfully parsed.
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      IDL generated parsers do not validate that the input element is a BSON array for attributes of type array<type>. The parsers do accept both - BSON arrays and objects with array layout (please see Steps To Reproduce for an example). Expected behavior is that only BSON arrays are accepted.

            Assignee:
            Garaudy Etienne
            Reporter:
            Mindaugas Malinauskas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: