Download does nothing: plugin frame CSP blocks fetching the blob: URL (no save dialog, no toast)

Open
#1,941 2 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

@seragAhmed is already working on this.

Since Nov 21, 2026.

  • #1943 by @seragAhmed — open

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

bug platform-desktop platform-docker
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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Termix-SSH/Termix

All issues in Termix-SSH/Termix

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.