ankitpokhrel / ankitpokhrel/tus-php

Checksum implementation does not match TUS specification

オープン
#422 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
PHP
スター
1.5k
フォーク
220
PR マージ指標
30日以内にマージされた PR はありません

説明

**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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。