You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Line 480 of yui.js uses Function('return this')() as a way to get a reference to the global object.
This poses a problem for sites that that do not allow eval or similar methods for creating code from strings to protect against XSS attacks or data injection via the Content-Security-Policy response header, which would block execution of YUI almost immediately.
The only option would be to enable the unsafe-eval directive, opening up the possibility of various attacks.
The text was updated successfully, but these errors were encountered:
we need a better way to detect global on the browser or at least a way to force to use a global value from config rather than letting YUI to compute it if it doesn't know how to compute it reliably.
this is also the reason why you can't use yui in a brower extension without blowing up the security of it.
Line 480 of yui.js uses
Function('return this')()
as a way to get a reference to the global object.This poses a problem for sites that that do not allow
eval
or similar methods for creating code from strings to protect against XSS attacks or data injection via the Content-Security-Policy response header, which would block execution of YUI almost immediately.The only option would be to enable the
unsafe-eval
directive, opening up the possibility of various attacks.The text was updated successfully, but these errors were encountered: