CQ HTTP eval in Classic UI Inbox
Since this is part of CQ API, I want to know how I can replace eval() here. Using eval() is a vulnerability.
Since this is part of CQ API, I want to know how I can replace eval() here. Using eval() is a vulnerability.
Hey @abhishekk861844,
This is an old unanswered query now but hopefully you got around a fix for it!
Evaluating JavaScript code from a string is hazardous. A string may consist of malicious code that will be run on the user's machine, and the scope, where eval() was called will be exposed for possible attacks.
The most simple alternative is to use windows.Function(). It creates a global scope function from the string.
Alternatively, eval(code) can artificially be replaced by (new Function('return '+code))()
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.