I have a web site where users allowed to enter javascript in order to comute some values. This script can be random and gets executed on serer side. I would like to perform some sort of validation in order to limit it only to "safe" functionality.
What I have came up so far is 1. Limit to single line of code, no \r\n allowed. 2. Do not allow "http", "//", "\", "include", "require" to appear
What else should I check in order to prevent crooks from executing random stuff on my backend?
Thank you.
Evgeny.