[SERVER-8220] db.eval('return print') crashes client Created: 17/Jan/13 Updated: 11/Jul/16 Resolved: 12/Feb/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | JavaScript, Shell |
| Affects Version/s: | 2.3.2 |
| Fix Version/s: | 2.4.0-rc1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ben Becker | Assignee: | Ben Becker |
| Resolution: | Done | Votes: | 0 |
| Labels: | javascript, shell | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: | > db.eval('print') |
||||||||
| Participants: | |||||||||
| Description |
|
| Comments |
| Comment by auto [ 12/Feb/13 ] |
|
Author: {u'date': u'2013-02-12T19:16:08Z', u'name': u'Ben Becker', u'email': u'ben.becker@10gen.com'}Message: |
| Comment by auto [ 12/Feb/13 ] |
|
Author: {u'date': u'2013-02-12T18:09:19Z', u'name': u'Ben Becker', u'email': u'ben.becker@10gen.com'}Message: |
| Comment by Ben Becker [ 12/Feb/13 ] |
|
Two issues here: 1) We have no protection for converting native code to/from BSON types. Same issue has always existed with SM (though SM throws a parse error). Proposed solution is to prevent v8ToMongo()* from converting native functions to BSON. 2) The named property accessors do not catch C++ exceptions. Should be trivial, assuming property accessors can throw JS exceptions. |
| Comment by Ben Becker [ 17/Jan/13 ] |
|
Same for db.eval('print'). |