r/javascript • • Aug 27 '15

The Evil Side of JavaScript: Server-Side JavaScript Injection

https://blog.nvisium.com/2015/08/the-evil-side-of-javascript-server-side.html
3 Upvotes

19 comments sorted by

View all comments

2

u/Anub1s .bind(this) Aug 27 '15 edited Aug 27 '15

It's use case is very rare.

eval(..) can at runtime modify the author-time lexical scope.

Also the JavaScript engine has a number of performance optimizations that it performs during the compiling phase.Most of those optimization it could make are pointless for the engine if eval(..) or with are used so it simply doesn't apply the optimizations at all and the code becomes pretty slow. Don't use them!