News for hackers. Stuff that matters.
Re:Is eval evil? Just-in-time compiling by kccqzy on Monday November 19, 2018 @02:12PM (#18488851)
That's a really nice example! Your whitelist is pretty restrictive. I was reminded of JSFuck where simply allowing six characters ( ) + [ ] ! would basically allow everything. Although I have to mention, your whitelist still permits undefined (such as x.x) as well as certain strings (0 + /./)

I'm also pretty sure the Google Closure library originally used whitelist checking + eval to parse JSON before JSON.stringify was a thing.

There are no comments on this comment yet.