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

Check if another file has been uploaded with the same blake2 digest #2928

Closed
wants to merge 1 commit into from

Conversation

alanbato
Copy link
Contributor

This tries to resolve #2490

I'm not sure if the uniqueness of the blake2 digest should be validated on file uploading or before, or if hijacking on the same "File already exists" message is helpful enough.

Also, I'm getting a weird error on my test, making it fail. Something about the request object missing a 'user' attribute.

Thanks for your feedback y'all.
🐍

@di
Copy link
Member

di commented Feb 12, 2018

The error is because your test is getting to this line:

            request.db.add(
                JournalEntry(
                    name=release.project.name,
                    version=release.version,
                    action="add {python_version} file {filename}".format(
                        python_version=file_.python_version,
                        filename=file_.filename,
                    ),
>                   submitted_by=request.user,
                    submitted_from=request.remote_addr,
                ),
            )

Which means it's trying to add the file being uploaded, so it seems like either something is wrong with your test, or with the new logic you added.

@di
Copy link
Member

di commented Feb 23, 2018

Hey @alanbato, need any help or more direction here?

@brainwane
Copy link
Contributor

I think @alanbato is having computer problems.

@alanbato
Copy link
Contributor Author

Yes I am 😢
If anyone wants to continue and build on this PR, please do so. I'll ping this thread when my computer gets better 😓

@brainwane
Copy link
Contributor

Thanks for all your work on this @alanbato which @yeraydiazdiaz was able to build on. Hope your computer heals soon!

@alanbato alanbato deleted the unique_blake2 branch March 20, 2018 22:23
@alanbato
Copy link
Contributor Author

@brainwane I'm glad it was of help :) And my computer lives to see another, so I'm ready to start contributing again! 😎

@brainwane
Copy link
Contributor

@alanbato I'd love your help with #3151.

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
3 participants