mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-02-05 00:29:40 +03:00
Attachments downloading as 4 byte files (contains the word 'null') #688
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jph on GitHub (Apr 18, 2020).
Subject of the issue
When attempting to download an attachment, I instead get a 4 byte file that contains the word 'null'.
Your environment
Steps to reproduce
Nothing configured away from the default - it's docker & caddy for SSL. Admin panel is enabled.
Steps: Attempt to download an attachment.
Expected behaviour
I should receive a decrypted attachment
Actual behaviour
I get a 4 byte file with 'null' as the content.
Relevant logs
Bitwarden logs don't seem to indicate an issue:
Update: grabbed the Caddy (proxy) logs too, and found something interesting.
The Caddy logs indicate the body size is 1181 bytes - almost exactly matching the filesize I've attempted to download. Further testing indicates this is indeed the case - below you can find a log of a 5mb attachment download.
But as you can see below, downloaded file size differs from the reported file size in Bitwarden.
@dani-garcia commented on GitHub (Apr 18, 2020):
Other user had this problem when enabling caddy gzip compression so check if you have it enabled and disable it if that’s the case.
https://bitwardenrs.discourse.group/t/downloading-attachment-in-firefox/62/14
@jph commented on GitHub (Apr 18, 2020):
It's as simple as that. My mistake, I didn't actually search the Discourse group. At least it's here now if anybody searches for it.
Thank you @dani-garcia for the quick reply. :)