Skip to content

Validate if a file with the same blake2 digest already exists (#2490)#3310

Merged
di merged 3 commits intopypi:masterfrom
yeraydiazdiaz:upload-diff-filename-same-blake2
Mar 20, 2018
Merged

Validate if a file with the same blake2 digest already exists (#2490)#3310
di merged 3 commits intopypi:masterfrom
yeraydiazdiaz:upload-diff-filename-same-blake2

Conversation

@yeraydiazdiaz
Copy link
Copy Markdown
Contributor

@yeraydiazdiaz yeraydiazdiaz commented Mar 18, 2018

Finishing off @alanbato's PR to fix #2490. Closes #2928.

Introduces a subtle shift in how we consider a file to exist in the database to be either the filename or the blake2 hash, which I believe should be safe enough.

Thanks for starting work on this one @alanbato 👍

@ewdurbin
Copy link
Copy Markdown
Member

ewdurbin commented Mar 19, 2018

Copy link
Copy Markdown
Member

@di di left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I agree with @ewdurbin, either we need to make this a separate error that is explicit about the file being rejected b/c the hash matches, or we need to update the existing help text (this happens rarely enough that the latter should suffice).

@yeraydiazdiaz yeraydiazdiaz force-pushed the upload-diff-filename-same-blake2 branch from 0e79690 to c1a4e72 Compare March 20, 2018 09:40
@di di merged commit 89efaa7 into pypi:master Mar 20, 2018
@di
Copy link
Copy Markdown
Member

di commented Mar 20, 2018

Thanks @yeraydiazdiaz!

@alanbato
Copy link
Copy Markdown
Contributor

Hooray @yeraydiazdiaz! Thanks for finishing it up right and proper :)

@yeraydiazdiaz yeraydiazdiaz deleted the upload-diff-filename-same-blake2 branch March 21, 2018 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validate Blake2 Uniqueness prior to saving

4 participants