Skip to content

Are you using eval? #6

Open
Open

Description

@linonetwo

I got this:

Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' 'nonce-iEsD2if45rrVbpVQzGD2Cw=='".

Activity

  1. linonetwo commented on Feb 16, 2020

    @linonetwo
    Author

    Maybe use something like patriksimek/vm2#85

  2. tdelmas commented on Feb 16, 2020

    @tdelmas

    I don't think vm2 will help websites to use safe CSP with this project, also it may harm performances. Maybe an option could specify if we want to switch between the fast generated function, or a not-generated-function if the maintainer really want to keep the generated function?

    @mikolalysenko are you interested in a PR to solve that problem? I really think it's important to allow websites to use a strong CSP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions