mmckegg / notevil

Evalulate javascript like the built-in javascript eval() method but safely.
195 stars 24 forks source link

'Invalid Date' returned when 'new Date()' is evaluated #38

Open incubusknight opened 4 years ago

incubusknight commented 4 years ago

Even though some other instantiation code works, like new Number(), when new Date() is evaluated it returns 'Invalid Date'.

For example:

notevil('new Date()'); // returns 'Invalid Date'
luizinhoz commented 3 years ago

workaround: notevil('new Date(null)');