[SERVER-9097] okForStorage should be stricter when checking for DBRefs Created: 22/Mar/13 Updated: 16/Sep/13 Resolved: 16/Sep/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Thomas Rueckstiess | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
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:
But should probably return false as they are not valid documents. This is used in many places to verify valid fields, including DBRefs. |