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

inline violated CSP script-src #3340

Open
rmk92 opened this issue Aug 26, 2021 · 6 comments
Open

inline violated CSP script-src #3340

rmk92 opened this issue Aug 26, 2021 · 6 comments
Labels

Comments

@rmk92
Copy link

rmk92 commented Aug 26, 2021

Describe Your Environment

  • Version of ZoneMinder [release version, development version, or commit]
    1.36.3
    (Unable to use 1.36.5 due to bug Capture daemon being restarted by zmwatch #3271)

  • How you installed ZoneMinder [e.g. PPA, RPMFusion, from-source, etc]
    From github Source + Debian buster .dsc and debian tarball on zmrepo

  • Full name and version of OS
    Linux 5.13 aarch64
    Debian Buster apache

  • Browser name and version (if this is an issue with the web interface)
    Frefox 91.0.2

Describe the bug
CSP errors being logged

To Reproduce
Steps to reproduce the behavior:

  1. Have console open with several monitors
  2. See error

Expected behavior
CSP not violated

Debug Logs


08/26/21 11:26:58.560391 web_js[12174].ERR [xxyyzz] [inline%20violated%20CSP%20script-src] at moz-extension line 46
08/26/21 11:27:07.952926 web_js[5138].ERR [xxyyzz] [inline%20violated%20CSP%20script-src] at moz-extension line 46
08/26/21 11:27:22.323030 web_js[14216].ERR [xxyyzz] [inline%20violated%20CSP%20script-src] at moz-extension line 46


@connortechnology
Copy link
Member

I believe this is not actually a zoneminder problem, but is caused by an extension. In my case the Plasma Integration causes it.
Disabled all extensions and reload and I think you'll find that there isn't a CSP violation. Re-enable extensions one by one until you find out which one causes it.

@rmk92
Copy link
Author

rmk92 commented Aug 28, 2021

Okay, I now know which extension causes it, and it's one that I use heavily... so what are the options? The only way to stop zoneminder logging errors is to completely disable that extension, which isn't a workable solution for me.

Can zoneminder just not log moz-extension CSP errors, so that then I don't have to set the logging level to "fatal" to prevent excess noise in the ZM logs? I've hacked the ZM javascript to do this, so it is possible, so the question is more whether it's desirable?

Thanks.

@connortechnology
Copy link
Member

I think that's what we need to do. Have a config option to turn off CSP reporting. Should be easy.

Out of curiosity, which extension causes it for you?

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 16, 2022
@ProjectPatatoe
Copy link

I found two extensions that cause it for me

@bceylon
Copy link

bceylon commented Aug 28, 2022

I'm seeing similar errors with Safari on Mac when Evernote browser Extension is in use (ZM v1.36.24):

8/28/22, 1:10:03 PM GMT+3 web_js 125661 ERR blob violated CSP worker-src safari-extension://D0C6F07F-96C9-49A9-BDB5-85170789FA65/commons.js 2
8/28/22, 1:10:03 PM GMT+3 web_js 115197 ERR Script error. ?view=log -
8/28/22, 1:10:01 PM GMT+3 web_js 115197 ERR blob violated CSP worker-src safari-extension://D0C6F07F-96C9-49A9-BDB5-85170789FA65/commons.js 2
8/28/22, 1:10:01 PM GMT+3 web_js 115197 ERR Script error. ?view=console -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants