Skip to content
This repository was archived by the owner on Mar 14, 2024. It is now read-only.
This repository was archived by the owner on Mar 14, 2024. It is now read-only.

unsafe-eval CSP directive throws. #2502

Closed

Description

@guest271314

⚠️ This is for issues with the https://developer.chrome.com site, not Chromium itself.
If you want to file a bug with Chromium (the open-source project behind Google Chrome and other browsers), please use https://crbug.com.

Describe the bug

{
  "name": "...",
  "version": "1.0",
  "manifest_version": 3,
  "background": {
    "service_worker": "background.js",
    "type": "module"
  },
  "content_security_policy": {
    "extension_pages": "script-src 'self' 'unsafe-eval'; object-src 'self';"
  }
}

throws


'content_security_policy.extension_pages': Insecure CSP value "'unsafe-eval'" in directive 'script-src'.
Could not load manifest.

To Reproduce
Steps to reproduce the behavior:
Include

'unsafe-eval'

in content_security_policy directive for extension_pages.
Expected behavior
No error to be thrown. Ability to use eval() in MV3 ServiceWorker.
Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Activity

  1. jpmedley commented on Apr 4, 2022

    @jpmedley

    @guest271314,

    Thank you for submitting this. Unfortunately, this repo is for reporting issues with a specific web site. To report an issue with Chrome:

    1. Click the Setting menu. (It looks like three vertical dots and is located in the upper right of the browser window.)
    2. Select Help, then Report an issue.
  2. guest271314 commented on Apr 10, 2022

    @guest271314
    Author
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

    P2A normal priority task. This is the default for most issues.bugSomething on the site is broken!

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions