securedrop-client icon indicating copy to clipboard operation
securedrop-client copied to clipboard

Disable "Print" when file format is not conducive to printing

Open ninavizz opened this issue 5 years ago • 5 comments

Problem

A bit to file in the "duh" bucket, and thus something I'm not at all worried about until the post-Pilot release...

Ya can't print a video file. Or a song, or a ZIP, an EXE, etc. As such, the obviousness of this qualifies it as a low-priority to me, at the time of this filling.

image

Solution

Disable the "Print" text-link next to files that are somehow not printable; be they compressed archives, videos, audio, or any other non-printable dealie-o. On second thought, perhaps best to approach this as only enabling the "Print" button to be live, for supported/known filetypes that can deal with printing. Images less than 100mb (or whatever), .doc, .pdf, .xls, .txt, etc.

ninavizz avatar Mar 11 '20 21:03 ninavizz

Spreadsheet here, nice guide for where to do.

ninavizz avatar Mar 12 '20 20:03 ninavizz

Cross-referencing https://github.com/freedomofpress/securedrop-workstation/issues/842 because it is a step towards fixing this issue.

gonzalo-bulnes avatar Oct 25 '22 17:10 gonzalo-bulnes

Removing the needs discussion label because the discussion is ongoing. Also this triggers widely unexpected behavior, so I'm labeling it as a bug.

gonzalo-bulnes avatar Oct 25 '22 17:10 gonzalo-bulnes

One thing to note about this is that "guessing" the file format requires some light parsing of the file. On Dangerzone we had a similar challenge. That's why we always deferred the "convertibility" check the unstrusted component. However, on Qubes, that requires starting a VM.

So I see a few approaches:

  1. We investigate how the parsing is done and conclude if its parsing language is just regular expressions, then I guess it could be fine to do in sd-app.
  2. If not, then we may be stuck with having to detect the profitability on the untrusted component.

deeplow avatar Jul 22 '24 13:07 deeplow

Or perhaps I am misunderstanding and the goal here is to disable the print on the print dialog itself rather than on the conversation view. If that's the case, please disregard my comment.

deeplow avatar Jul 22 '24 13:07 deeplow