Opened 11 years ago
Closed 11 years ago
#10540 closed Bug (duplicate)
Do not use eval because it violates Content Security Policy ("unsafe-inline")
Reported by: | Piotrek Koszuliński | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: |
Description
Reported on GitHub: https://github.com/ckeditor/ckeditor-dev/commit/321ddbbe74a
We use eval in env.js and a function constructor in templates. Worth checking if we're not using setTimeout or setInterval with string somewhere in older code.
Below is part of http://www.w3.org/TR/CSP/ spec:
If 'unsafe-eval' is not in allowed script sources:
The term callable refers to an object whose interface has one or more callers as defined in the Web IDL specification [WEBIDL].
There is more general ticket about CSP - #8584 so this is a small duplicate of the former ticket.