Skip to content

Firefox CSP Error - Time tracker button not rendering (v2.0.1) #80

@JulienBreton

Description

@JulienBreton

💻 Operating system

Ubuntu

🌐 Browser and version

Firefox 150.0

🧩 Extension version

2.0.1

🧱 Redmine version

Powered by Redmine © 2006-2024 Jean-Philippe Lang

🐛 Bug description

The time tracking UI is missing from the interface.

Important: The extension works perfectly on Chrome with the exact same Redmine instance and credentials. This indicates a browser-specific security restriction rather than a configuration error.

🧪 Steps to reproduce

  1. Open any Redmine issue page in Firefox.
  2. Ensure the API key and URL are correctly configured (Connection test: Success).
  3. Observe that the time tracking UI is missing from the interface.

📎 Additional context / screenshots

The Firefox console shows a Content Security Policy (CSP) violation preventing the script injection. Firefox is stricter than Chrome regarding dynamic code execution in content scripts.

EvalError: call to Function() blocked by CSP content.js:1329:165204
    <anonymous> moz-extension://[ID]/content-scripts/content.js:1329
    content moz-extension://[ID]/content-scripts/content.js:1
    ...

The extension seems to be using new Function() or eval() within content.js to inject the UI. While Chrome's isolated world might allow this, Firefox blocks it if the host's (Redmine) CSP does not explicitly allow unsafe-eval.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstatus: verifiedIf a issue could be reproduced

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions