Expand my Community achievements bar.

SOLVED

unsafe-eval issue in plugins

Avatar

Level 2

Hi,

 
Currently we consume Adobe Analytics from our scripts and there's no issue with loading those overall. But we have issues with the plugins. All of those plugins are loaded using 'new Function()' javascript and that is considered unsafe-eval.
 
What can be done to resolve the issue?
 
Thanks.
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

I checked with @jane_12 and it seems like the have super old AppMeasurement plugin code in place that actually uses this construct.

s.apl = new Function(...)

 

Recommended her to update her plugin versions or change to 

 

s.apl = function(...)

Cheers from Switzerland!


View solution in original post

3 Replies

Avatar

Community Advisor

Hi @jane_12 ,

which plugins are you referring to? I checked a couple of my clients and cannot find the expression

new Function()

anywhere in the code loaded through Launch neither the core nor additionally loaded scripts.


If you like, you can send me a DM with your client's URL

Cheers from Switzerland!


Avatar

Community Advisor and Adobe Champion

This almost sounds like your developer changed the code of the plugins... Like @bjoern__koth , I have never seen the use of "new function()" in any of the Adobe provided code... 

 

Are you sure these are specifically plugins? Or maybe this is being used in custom code (data Elements or Actions, etc)?

 

Like Bjorn, if you are willing to share a URL via private messaging, I would also be happy to take a look and offer suggestions on how to fix.

Avatar

Correct answer by
Community Advisor

I checked with @jane_12 and it seems like the have super old AppMeasurement plugin code in place that actually uses this construct.

s.apl = new Function(...)

 

Recommended her to update her plugin versions or change to 

 

s.apl = function(...)

Cheers from Switzerland!