# Firefox: Ctrl+click multi-selection in mail broken — CSP blocks an inline event handler (26.9.20260907)

**URL:** <https://help.egroupware.org/t/firefox-ctrl-click-multi-selection-in-mail-broken-csp-blocks-an-inline-event-handler-26-9-20260907/80006>\
**Category:** English\
**Created:** [September 10, 2026, 11:59am UTC](https://help.egroupware.org/t/firefox-ctrl-click-multi-selection-in-mail-broken-csp-blocks-an-inline-event-handler-26-9-20260907/80006 "2026-09-10T11:59:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![karpaga](https://help.egroupware.org/letter_avatar_proxy/v4/letter/k/7993a0/32.png) [@karpaga](https://help.egroupware.org/u/karpaga)\
**Post date:** [September 10, 2026, 11:59am UTC](https://help.egroupware.org/t/firefox-ctrl-click-multi-selection-in-mail-broken-csp-blocks-an-inline-event-handler-26-9-20260907/80006/1 "2026-09-10T11:59:17Z")

</div>

## 1. Ctrl+click multi-selection broken in Firefox: CSP blocks an inline event handler

**Severity:** blocking for us — ~90% of our users are on Firefox, and moving  
mails between folders is daily work.

### Environment

- EGroupware **26.9.20260907** CE (`api`, `mail`, `kdots` all at schema 26.1)
- Official Docker image `egroupware/egroupware@sha256:e2dad0f93d85e9c39167e67d59daca54d448f62fdece9d1e0d76931cb1c4fd4d`  
(current `:26` tag as of 2026-09-10)
- nginx + php-fpm (PHP 8.5), served over HTTPS only
- **Broken:** Firefox
- **Works:** Chrome and Brave (Chromium)
- Tested in a private/incognito window, so no stale browser cache involved

### What happens

In the mail list, `Ctrl+click` no longer adds a row to the selection on the  
**first** click. Selecting a single row works; extending the selection does not.

### Steps to reproduce

1. Open the mail app in Firefox.
2. Click a message to select it.
3. Hold `Ctrl` and click a **different** message.  
→ **Nothing happens.** The second message is not added to the selection.
4. Still holding `Ctrl`, click that same message **again**.  
→ Now it _is_ added, and the multi-selection behaves normally.
5. If that second click comes too quickly, it is treated as a double click:  
the previous selection is cleared and only the clicked row stays selected.

So every row needs two deliberate, separated `Ctrl+click`s to join the selection.

### Expected

`Ctrl+click` adds the row to the selection on the first click, as it did in  
EGroupware 17 and as it still does in Chromium browsers.

### Console error

Firefox logs this **as soon as a single message is selected** (message shown in  
the Spanish locale, hence the translated text):

```auto
Content-Security-Policy: La configuración de la página bloqueó la ejecución de
un controlador de eventos (script-src-attr) porque viola la siguiente
directiva: "script-src 'self'". Considere usar un hash
('sha256-47mKTaMaEn1L3m5DAz9muidMqw636xxw7EFAK/YnPdg=') junto con
'unsafe-hashes'.

```

In English: _the page’s settings blocked the execution of an event handler  
(script-src-attr) because it violates the following directive: `script-src 'self'`. Consider using a hash together with `'unsafe-hashes'`._

Chromium does not report this and the feature works there.

### Analysis

The Content-Security-Policy EGroupware itself sends does **not** allow inline  
event handlers:

```auto
content-security-policy: script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline';
connect-src 'self' data:; manifest-src 'self'; frame-ancestors 'self';
img-src 'self' data: https: blob:; font-src 'self'; default-src 'none'

```

That is intentional — `api/src/Header/ContentSecurityPolicy.php:25` says so:

> `"script-src 'self' 'unsafe-eval'"` allows only self and eval, but forbids  
> inline scripts, onchange, etc

So EGroupware 26 appears to install an inline event handler that its own policy  
forbids.

The handler is **generated at runtime** : we scanned the whole source tree  
(2120 files, 613 distinct `on*` attributes in `.xet`, `.html`, `.php`, `.js`,  
`.ts`) computing the CSP sha256 of every attribute value, and none matches  
`47mKTaMaEn1L3m5DAz9muidMqw636xxw7EFAK/YnPdg=`.

**This is a regression against EGroupware 17** , not a policy change: our 17  
instance shares the same database and sends an equivalent policy —

```auto
Content-Security-Policy: script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline';
connect-src 'self' ; frame-src 'self'

```

— and `Ctrl+click` multi-selection works there. The policy did not change; the  
code that runs under it did.

### Why we cannot work around it locally

- There is no configuration option for the CSP; it is built entirely in code.
- The `csp-script-src` hook exists (`ContentSecurityPolicy.php:76` dispatches  
`'csp-'.$source`) but implementing it needs an app inside  
`/usr/share/egroupware/`, which the Docker entrypoint wipes on every start  
(`rsync -a --delete`).
- Overriding the header in nginx would mean freezing a policy that EGroupware  
varies per page — including `mail/inc/class.mail_ui.inc.php:3557`, which  
deliberately **tightens** it when rendering a message body. We are not willing  
to weaken the sandbox around incoming mail to fix a selection bug.

### Current workaround for our users

Hold `Ctrl` and click each message **twice** , with a clear pause between the two  
clicks (clicking twice quickly registers as a double click and resets the  
selection).

### What would help

Either bind the handler in JavaScript instead of as an inline attribute, or add  
the required hash/`'unsafe-hashes'` to the policy from the code that installs it.
