gf3 / sandbox

A nifty JavaScript sandbox for Node.js
ISC License
844 stars 123 forks source link

Need to update required version of Node #11

Closed rehanift closed 12 years ago

rehanift commented 12 years ago

The security enhancements that @bmeck made require the use of "use strict". After some reading, "use strict" doesn't appear in node.js until sometime after v0.5.0. I tried to find the exact version but I haven't found it yet. package.json should be updated to prevent versions of node that do not implement "use strict" from installing the module.

Output with v0.6.6 (latest)

Example 1: 2

Example 2: 'Hi there, Fabio!'

Example 7: []

Example 6: 'TypeError: Illegal access to a strict mode caller function.'

Example 8: 'TypeError: Cannot read property \'name\' of null'

Example 3: 'SyntaxError: Unexpected token )'

Example 4: 'ReferenceError: process is not defined'

Example 9: { console: {}, x: 1 }

Example 5: TimeoutError

Output with v0.4.12

Example 1: 2

Example 2: 'Hi there, Fabio!'

Example 4: 'ReferenceError: process is not defined'

Example 9: { console: {}, x: 1 }

Example 3: 'SyntaxError: Unexpected token )'

Example 6: null

Example 7: []

Example 8: 'BasicSerializeArray'

Example 5: TimeoutError
bmeck commented 12 years ago

Good catch!

gf3 commented 12 years ago

Indeed, great catch @rehanift, thank you!