Security
High
All
SN-0107
The eval() function evaluates or executes an argument. Improper use of eval() opens up your code for injection attacks and debugging can be more challenging, as no line numbers are displayed with an error.
Avoid the use of eval. It encourages the use of untrusted code. If you must execute arbitrary code, use GlideScriptEvaluator which ensures it came from a record.
30 min
let value = eval(‘obj.’ + propName);
let value = eval(gs.getProperty(‘variableWhichHoldsSafeCode’));