[SERVER-25973] BSON code with scope serializes corrupt data Created: 06/Sep/16  Updated: 29/Jan/18  Resolved: 12/Jun/17

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Jonathan Reams Assignee: Ted Tuckman
Resolution: Duplicate Votes: 0
Labels: neweng, platforms-interns-2017
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-27954 Viewing a code_w_s object in the shel... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platforms 2017-06-19
Participants:

 Description   

It appears that we are not correctly converting code w/scope BSON types into strings - noticed this when calling explain on a query using $where

"$where" : {
    "code" : "*\u0000\u0000\u0000function () { sleep(1000); return true; }\u0000\u0005\u0000\u0000\u0000\u0000\u0000\u0000\u0000",
    "scope" : {
 
    }
}


Generated at Thu Feb 08 04:10:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.