-
Type: Bug
-
Resolution: Duplicate
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Internal Code
-
None
-
Fully Compatible
-
ALL
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.
- related to
-
SERVER-7557 Update doesn't support "$"s in the field (not at the start)
- Closed