Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The signature comes after the files in the POST request payload, which causes problems #51

Closed
tim-kos opened this issue Jun 6, 2018 · 1 comment · Fixed by #65
Closed
Assignees
Labels
prio-3 sdks Integrations for Transloadit's API

Comments

@tim-kos
Copy link
Member

tim-kos commented Jun 6, 2018

In the POST payload to /assemblies, the signature should come right after the "params" field, and not after the files. There are various reasons:

  • It will create a NO_SIGNATURE_FIELD on the Assembly in some cases, which is a race condition that I will fix on our end.
  • The user should not need to wait for all of the files to upload to our server only to find out that she calculated the signature wrongly. On Transloadit's side we evaluate the signature as soon as it comes in and by that we could end the connection quickly if the signature is wrong.

Relevant code parts are:
https://github.com/transloadit/ruby-sdk/blob/master/lib/transloadit/assembly.rb#L60
https://github.com/transloadit/ruby-sdk/blob/master/lib/transloadit/request.rb#L77
https://github.com/transloadit/ruby-sdk/blob/master/lib/transloadit/request.rb#L129

I feel it's good design that the signature calculation code lives in the Request class and is added as an after thought. But I feel it might need to be moved to the assembly class and added before the files are added.

@lekevbot lekevbot added the sdks Integrations for Transloadit's API label Feb 8, 2021
@lekevbot lekevbot added the prio-3 label May 4, 2023
Acconut added a commit that referenced this issue Jan 10, 2024
Acconut added a commit that referenced this issue Jan 10, 2024
* Ensure that signature is sent before files

Closes #51

* Fix linting

* Update CHANGELOG.md
@Acconut
Copy link
Member

Acconut commented Jan 10, 2024

Fixed in #65.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio-3 sdks Integrations for Transloadit's API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants