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

replace constant_time_compare with hmac.compare_digest #58

Closed
wants to merge 4 commits into from

Conversation

jllopezpino
Copy link

Hi Mike,

My commit should fix the problem that I reported on #57.
It would be great if you can review it and release a new version to pypi because latest itsdangerous version on pypi breaks this package.

Thanks!

@@ -27,11 +27,7 @@
from PIL import Image, ImageFilter
from flask import request, current_app, send_file, abort

try:

Choose a reason for hiding this comment

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

you need to keep the import of Signer

@mikeboers
Copy link
Owner

Hi @jllopezpino,

Thanks for your patience.

I believe @invisiblek is correct, and it won't work as-is.

I think we ought to:

  • Use hmac.compare_digest as you did
  • Use hmac to do the signing for simplicity (ideally allowing use of the same settings that itsdangerous did so that signatures remain compatible
  • Remove all of the nonsense required for Py2 to work; I'm fine with only supporting >=3.3.

@jllopezpino
Copy link
Author

  • Remove all of the nonsense required for Py2 to work; I'm fine with only supporting >=3.3.

I would go that way. But you are the maintainer here : )

@jllopezpino
Copy link
Author

#60 already covers this

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.

4 participants