Skip to content

fix: tighten whiteboard collaboration CSP#1263

Open
hweihwang wants to merge 1 commit into
mainfrom
fix/csp-collab-backend-and-fonts
Open

fix: tighten whiteboard collaboration CSP#1263
hweihwang wants to merge 1 commit into
mainfrom
fix/csp-collab-backend-and-fonts

Conversation

@hweihwang

@hweihwang hweihwang commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Apply Whiteboard CSP only on page routes that can host Whiteboard, including Talk and /call pages.
  • Add the configured collaboration backend HTTP(S) origin and matching WS(S) origin to connect-src without wildcards.
  • Self-host Excalidraw fonts and fail the build if the CDN fallback rewrite stops matching.

Fixed issues

Fixes #1250
Fixes #1222
Fixes #1215
Fixes #1198

@gseilheimer

Copy link
Copy Markdown

Heads-up from testing this area on 1.5.9 (Nextcloud 34.0.1): tightening connect-src without adding libraries.excalidraw.com will keep #724 broken.

The "Add to Excalidraw" flow imports via a plain browser fetch() of the .excalidrawlib from libraries.excalidraw.com, so it needs that origin in connect-src. Today it is never added — getCollabBackendCspConnectDomains() derives origins strictly from collabBackendUrl — and this PR keeps that shape, so the library import stays blocked.

Details and evidence in #724 (comment).

Assisted-by: OpenAI Codex:gpt-5.6-sol
Signed-off-by: Hoang Pham <hoangmaths96@gmail.com>
@hweihwang
hweihwang force-pushed the fix/csp-collab-backend-and-fonts branch from 702659d to 446038f Compare July 22, 2026 12:07
@hweihwang

Copy link
Copy Markdown
Contributor Author

Thanks for catching this, good call @gseilheimer. We’ve pushed the fix to allow libraries.excalidraw.com in connect-src when external libraries are enabled, along with test coverage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🏗️ In progress

3 participants