Download does nothing: plugin frame CSP blocks fetching the blob: URL (no save dialog, no toast)
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- docker, electron, typescript
Research direction
The CSP line is built in dist/backend/backend/http/security-headers.js, where connect-src lists assets, api and ws but not blob:. Start by reading triggerBlobDownload() in the File Manager plugin frontend to see the blob: fetch path, then compare with the frame policy. Done means a Download from the File Manager opens the save dialog, but PR #1943 is already open against this issue, so check it before starting.
Written by the indexing model from the issue text.
Description
What happened?
In the File Manager, right-click a file → Download (or Ctrl+D) does nothing at all: no save dialog, no progress or error toast, and no file is written.
The download stream is fetched and turned into a blob, but handing that blob off for the actual download is blocked by the Content Security Policy of the plugin frame.
Steps to reproduce
Open the File Manager on any SSH host.
Right-click a regular file (e.g. an 800-byte .log) → Download.
Nothing happens.
What did you expect?
Windows open to show where save the file
Termix version
Termix desktop (Windows x64, NSIS install) 26.11.3
Plugin version
File Manager plugin 1.3.0 (bundled)
Environment
Termix desktop (Windows x64, NSIS install) 26.11.3
File Manager plugin 1.3.0 (bundled)
SSH host: Ubuntu, SFTP
Server (Docker ghcr.io/lukegus/termix:latest) 26.11.3 — it ships the same CSP line, so the web UI is likely affected too (not verified)
Logs
Connecting to 'blob:null/583cb323-48b0-4f06-985b-a28a78bf642b' violates the following Content Security Policy directive: "connect-src <URL> <URL> ws:<URL>/plugin-ws/file-manager/". The action has been blocked.
Fetch API cannot load blob:null/583cb323-48b0-4f06-985b-a28a78bf642b. Refused to connect because it violates the document's Content Security Policy.
Anything else?
Cause
triggerBlobDownload() in the plugin frontend creates a blob: object URL and clicks an . Inside the sandboxed plugin frame (opaque origin → blob:null/...), the blob then has to be read with fetch(), but the frame CSP built in dist/backend/backend/http/security-headers.js does not allow blob: in connect-src:
["img-src", [assets, runtime, "data:", "blob:"]],
["media-src", [assets, "data:", "blob:"]],
["connect-src", [assets, api, ws]], // <- no blob:
["worker-src", ["blob:"]],
Workaround / confirmed fix
Adding "blob:" to the frame's connect-src fixes it:
["connect-src", [assets, api, ws, "blob:"]],
After restarting the desktop app, Download opens the native "Save as" dialog and the file is saved correctly.
Since the CSP lives in Termix core, this may need to be fixed in Termix-SSH/Termix rather than here (or the plugin could pass the bytes to the host through the plugin bridge instead of a blob: URL).
Before you submit
- I searched open and closed issues and this is not a duplicate
- I am on the latest version, or I said which version I am on
- Dominant language
- TypeScript
- Stars
- 16.1k
- Forks
- 776
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 57
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Termix-SSH/Termix
-
bug platform-desktop platform-windows
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Termix-SSH/Termix#1951 · 2 comments ·
Maintainers usually reply within 1 day
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Termix-SSH/Termix#1843 · 1 reaction ·
Maintainers usually reply within 1 day
-
bug platform-android
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Termix-SSH/Termix#1829 · 2 comments ·
Maintainers usually reply within 1 day
-
bug platform-windows
Difficulty 3/5 1-2 days Newbie friendliness 52/100
Termix-SSH/Termix#1953 · 1 comment ·
Maintainers usually reply within 1 day
-
bug platform-docker platform-web
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
Termix-SSH/Termix#1950 · 1 comment ·
Maintainers usually reply within 1 day
All issues in Termix-SSH/Termix
Similar issues
-
[MCP]: page snapshots in .playwright-mcp/ are not git-ignored (.playwright-cli/ is, since #42318)Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
microsoft/playwright#44289 ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 Half a day Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
blamechris/chroxy#9272 ·
Maintainers usually reply within 1 day
-
no-repo-link tool-submission
Difficulty 1/5 Under an hour Newbie friendliness 66/100
BraveOPotato/NoSignups#2458 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
drmrd/vernacular#1061 ·
Maintainers usually reply within 1 day