filepizza icon indicating copy to clipboard operation
filepizza copied to clipboard

Downloaded file differs from original

Open realityexists opened this issue 9 months ago • 7 comments

As a test, I tried to transfer https://github.com/freedomofpress/dangerzone/releases/download/v0.3.1/Dangerzone-0.3.1.msi to myself using https://file.pizza/ in Firefox 115.21.0esr on Windows, with the receiver tab in a Private Browsing window, and found that the received file had some differences to the original in several places (comparing with Beyond Compare or fc /b). The file sizes were the same, though. Tried a second time and the received file differed again (from the original and from the first received file). Tried it with a smaller .pdf file and that was received correctly.

realityexists avatar Mar 13 '25 19:03 realityexists

I compared the hash value of uploaded one and downloaded one. They are different. Why?

xjx0106 avatar Jun 21 '25 17:06 xjx0106

If they are reliably not identical, then there is a big problem.

Technetium1 avatar Jun 22 '25 01:06 Technetium1

Yes, definitely. Can anyone confirm that this is indeed the case?

pblue3 avatar Jun 23 '25 09:06 pblue3

Tried transferring that Dangerzone file to a friend using Floorp 11 (Firefox ESR) and Chrome, they are able to reliably reproduce a sha256sum of 68f813f8af0666e19117d8a31bff94a0044fbddfc0c281840a945c6416018c5d both times.

I think this might be caused by your ISP or firewall mangling traffic, even though it hopefully shouldn't be doing it intentionally. If you can confirm repeatable corruption, please give all the details that are possible, and retain the corrupt file(s) for a binary diff.

Technetium1 avatar Jun 24 '25 23:06 Technetium1

I recently had a problem similar to this, so I tried it with a randomly generated binary file (created with dd if=/dev/urandom of=testfile.bin bs=1M count=1024 status=progress).

After transferring the file, the downloaded one was smaller, just barely. The original file was exactly 1 Gibibyte (1073741824 bytes), and the downloaded file was exactly 0.25 mebibytes (262144 bytes) smaller, making the outputted file 1073479680 bytes.

I haven't looked at the source code (yet) but it seems like more than just coincidence that the lost data is such a round number, so I'll investigate further when I get the chance

johnjohntheleprechaun avatar Jul 15 '25 01:07 johnjohntheleprechaun

Further Testing

The issue seems to only occur when the file is being sent from Firefox, regardless of the receiving browser. Firefox when acting as the receiver works fine.

There's no errors or warnings on the sender page, but on the client page it seems like the download finished (or at least thought it did) before all the data was actually sent.

Versions

  • Mozilla Firefox 138.0.4
  • Chromium 136.0.7103.113

Full Logs From Receiving Pages

johnjohntheleprechaun avatar Jul 15 '25 02:07 johnjohntheleprechaun

Since there's no documentation, I haven't managed to get the server fully working on my local machine, my next semester of college starts soon, and there's some evidence that the project is vibe coded (the .claude directory and the CLAUDE.md and .cursorrules files): I've decided that trying to track down the root of the issue isn't worth the time and effort for me. Sorry peeps :(

johnjohntheleprechaun avatar Aug 03 '25 02:08 johnjohntheleprechaun