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

@auth doesn't work in python3 because of comparison bytes with str #25

Closed
ben-xo opened this issue Dec 17, 2019 · 1 comment
Closed

Comments

@ben-xo
Copy link

ben-xo commented Dec 17, 2019

sign.py calls get_signature(request) and passes it to validate_multiple_signatures(), which calls make_hmac_for(key, body). Unfortunately, the signature from get_signature is a string, whilst the signature from make_hmac_for() is a byte array.

The workaround is to cast them both to byte arrays with six.b() right before the comparison, otherwise they comparison always fails.

@jamesjwarren
Copy link
Member

Fixed in #26

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

No branches or pull requests

2 participants