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

Direct Upload: missing error check for checksum #10344

Closed
qqmyers opened this issue Feb 27, 2024 · 0 comments · Fixed by #10345
Closed

Direct Upload: missing error check for checksum #10344

qqmyers opened this issue Feb 27, 2024 · 0 comments · Fixed by #10345
Labels
Milestone

Comments

@qqmyers
Copy link
Member

qqmyers commented Feb 27, 2024

Although the Guides say the checksum is required (see https://guides.dataverse.org/en/latest/developers/s3-direct-upload-api.html#adding-the-uploaded-file-to-the-dataset) the code doesn't do an upfront check to provide a useful 400/error message. Instead, the call eventually gets to code for the normal upload process and tries/fails to calculate the checksum on an assumed temp file copy (which doesn't exist), resulting in a failure to write a null checksum to the datafile table. The code should check for the checksum in the submitted jsonData (in the old or new format) and send a 400 error if it is missing.

Thanks to JHU/ @donsizemore for reporting.

What steps does it take to reproduce the issue? Call the direct upload API as in the guides but omit a checksum.

Which version of Dataverse are you using?
Dataverse 6.1 and earlier

@pdurbin pdurbin added this to the 6.1.1 milestone Mar 13, 2024
@scolapasta scolapasta modified the milestones: 6.1.1, 6.2 Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants