Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

downgrade regenerator-runtime due to unsafe eval usages #1062

Merged
merged 2 commits into from
Sep 9, 2020

Commits on Sep 4, 2020

  1. Remove use-strict from js non modern js bundle

    By default, rollup bundles js in strict mode.
    When regenerator-runtime is included in use-strict
    mode, they use a Function() call (which is like
    a slightly safer eval()) to initialize things.
    Specifically
    ```js
      Function("r", "regeneratorRuntime = r")(runtime);
    ```
    Removing use-strict mode lets regenerator runtime init
    without any unsafe evals. Because strict mode
    javascript is a subset of regular javascript, this
    should not break any code. AFAIK there is no way
    to require a script tag to be in 'use strict' mode.
    
    T=https://yextops.zendesk.com/agent/tickets/347915
    TEST=manual
    
    tested with a local apache httpd server
    added below line to .htaccess, which sets the CSP to
    the same as Syncreon
    
    also test csp with a `<meta>` tag
    
    tested both answers.js and answers.min.js
    oshi97 committed Sep 4, 2020
    Configuration menu
    Copy the full SHA
    1e3df7c View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2020

  1. Configuration menu
    Copy the full SHA
    1e2723b View commit details
    Browse the repository at this point in the history