brutusin / brutusin/json-forms
Unnecessary eval prevents execution in CSP environment
- Dominant language
- JavaScript
- Stars
- 618
- Forks
- 171
- PR merge metrics
- No merged PRs in 30d
Description
The script uses the command `eval` in line [1242](https://github.com/brutusin/json-forms/blob/d0fa10a7c364134c9e81911dd60a9e1f80d47385/dist/js/brutusin-json-forms.js#L1242). As far as I can see, this command is useless, as there are no other variables that require this function.
However, usage of the `eval` command collides with Content-Security-Policies. Those usually deny this command and will block of the data insertation. Allowing this command will allow it everywhere and contradicts the purpose of CSP.
Minor changes in the following PR will remove this command and allows it to run successfully in a CSP controlled environment.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.