ankitpokhrel / ankitpokhrel/tus-php
Checksum implementation does not match TUS specification
- Vorherrschende Sprache
- PHP
- Sterne
- 1.5k
- Forks
- 220
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
**Describe the bug**
While Implementing my own PHP server-side code for receiving TUS uploads, and using your implementation as a reference, I noticed that your checksum implementation works completely different from what is specified in the TUS Checksum Extension specification.
**To "Reproduce"**
Your implementation expects a checksum for the whole upload in the Upload-Creation POST request and checks the whole upload against that checksum at the end.
**Expected behavior**
According to [the spec](https://tus.io/protocols/resumable-upload.html#checksum), the checksum should be read from the header of each PATCH request and should only be checked against the data contained in that request.
**Screenshots**
Not applicable.
**Additional context**
I have to say, that I much prefer your implementation, as it makes much more sense for regular (un-chunked) file uploads. However it is not conforming to the spec, which is aimed at more general-purpose uploading. The server advertises support for the checksum extension, but will then completely ignore any checksums received in PATCH-requests. And no spec-conforming client will send a Upload-Checksum header with the upload-creation POST.
In my implementation I will replicate your behaviour using upload metadata, so it won't conflict with the TUS specification.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.