[SERVER-3425] Server crash when passed invalid JS in CodeWScope object Created: 13/Jul/11  Updated: 12/Jul/16  Resolved: 05/Oct/11

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

Type: Bug Priority: Minor - P4
Reporter: Ben Osheroff Assignee: Antoine Girbal
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

If you pass uncompilable javascript into mongo via a CodeWScope BSON object, the server crashes. Compiling from a "Code" object has a NULL-check around compilation, but compiling from CodeWScope doesn't. Patch at https://gist.github.com/1080695 fixes.



 Comments   
Comment by Antoine Girbal [ 05/Oct/11 ]

thanks for report and fix.
Could not add test for now, test depends on SERVER-3391

Comment by auto [ 05/Oct/11 ]

Author:

{u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}

Message: SERVER-3425: Server crash when passed invalid JS in CodeWScope object
Branch: master
https://github.com/mongodb/mongo/commit/f895b46f9e858dd0ae3a268da66cd6f9c526e9dc

Generated at Thu Feb 08 03:03:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.