Commands should convert integers from user input safely

XMLWordPrintableJSON

    • Query Optimization
    • Fully Compatible
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, almost all commands use BSONElement::numberLong or BSONElement::numberInt to parse user input for fields that expect a number. This results in undefined behavior when the input is outside the range of a valid integer type.

      User-facing commands should use BSONElement::safeNumberLong instead. See the geoNear command as an example.

              Assignee:
              Nicholas Zolnierz
              Reporter:
              Robert Guo (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: