We have a user reporting issues with h:commandLink and CSP:
Especially the call
var f = new Function("event", arguments[i]);
that dynamically creates js function which requires unsafe-eval.
This breaks the content security policy.
The commandLink could be as simply as :
<h:commandLink action="" value="Click
Me"/>
Specifically, the error given is "Content-Security-Policy: The
page’s settings blocked a _javascript_ eval (script-src) from being
executed because it violates the following directive: “script-src
'self' "
In looking at the issue, I found this MyFaces issue:
https://issues.apache.org/jira/browse/MYFACES-4481
The comments on the issue suggest that a spec change might have
been necessary to fix this issue, but I can't see where or if
anything was done on this.
The user is reporting this against 4.0.8. Is there a known
work-around or fix we can suggest for the user?
--
Jason Lee
OKC JUG President
https://jasondl.ee
https://twitter.com/jasondlee
http://linkedin.com/in/jasondlee
_______________________________________________