okForStorage should be stricter when checking for DBRefs

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • Fully Compatible
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      DBRefs are okForStorage in jsobj.cpp:891, but the code only checks for existence of $ref or $id. It should be stricter, checking for both $ref and $id.

      Currently, these return true for okForStorage:

      • {$id: 1}
      • {$ref: 1}

      But should probably return false as they are not valid documents.

      This is used in many places to verify valid fields, including DBRefs.

              Assignee:
              Unassigned
              Reporter:
              Thomas Rueckstiess (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: