securedrop icon indicating copy to clipboard operation
securedrop copied to clipboard

Retrying a failed download from a SecureDrop results in a 4k empty file being saved to disk

Open nathandyer opened this issue 2 years ago • 1 comments

Description

After a download from a SecureDrop fails when accessed from a Journalist Workstation, if you click the 'Retry' button, it "completes" the download by saving a 4kb empty text file, rather than the original submission.

Steps to Reproduce

  1. Fill the local filesystem with enough data to nearly be out of storage space.
  2. Download a relatively large submission from a SecureDrop instance.
  3. The download should fail once the filesystem runs out of space.
  4. Make some more room on the disk.
  5. Click "Retry" on the download from inside Tor browser.
  6. An empty file will be downloaded.

Expected Behavior

Clicking "Retry" downloads the original submission.

Actual Behavior

Clicking "Retry" downloads an empty file.

nathandyer avatar Dec 22 '22 20:12 nathandyer

Per testing at least with the dev env this appears to be limited to downloading collections (even if said collection only contains one file), not individual files from the source page:

Peek 2022-12-22 13-42

I'm not sure client-side retry on collection downloads is viable since those are compiled via a POST request and subsequent server-side generation of a ZIP response.

eloquence avatar Dec 22 '22 23:12 eloquence