Validate if a file with the same blake2 digest already exists (#2490)#3310
Validate if a file with the same blake2 digest already exists (#2490)#3310di merged 3 commits intopypi:masterfrom
Conversation
|
@yeraydiazdiaz thanks for picking this up! Can we update the error message at https://github.com/yeraydiazdiaz/warehouse/blob/be94c82324c18c9e7c12a0c79d83cacac1a2cd58/warehouse/forklift/legacy.py#L1083-L1088 and help-text at https://github.com/yeraydiazdiaz/warehouse/blob/be94c82324c18c9e7c12a0c79d83cacac1a2cd58/warehouse/templates/pages/help.html#L225-L238 to note the new possible reasons for the error? |
di
left a comment
There was a problem hiding this comment.
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).
0e79690 to
c1a4e72
Compare
|
Thanks @yeraydiazdiaz! |
|
Hooray @yeraydiazdiaz! Thanks for finishing it up right and proper :) |
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 👍