Is there a security risk in evaluating Javascript code submitted from the browser on a server (Java webapp using Rhino Javascript Engine)?
The purpose of evaluating the JavaScript is simply to determine its validity.
No results are expected from the evaluation, and no data should be stored or manipulated. The only goal is to verify if valid JavaScript was submitted by the user.
If this process raises concerns about security, what measures can be taken to ensure that the JavaScript does not harm the system?