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

TypeError in parse_signed_request() #22

Closed
tomako opened this issue Mar 1, 2012 · 2 comments
Closed

TypeError in parse_signed_request() #22

tomako opened this issue Mar 1, 2012 · 2 comments

Comments

@tomako
Copy link

tomako commented Mar 1, 2012

When I call parse_signed_request() with app_secret in unicode the hmac drops a TypeError exception:
"C:\Python26\lib\hmac.py", line 72, in __init__ self.outer.update(key.translate(trans_5C)) TypeError: character mapping must return integer, None or unicode

@martey
Copy link
Member

martey commented Mar 2, 2012

Based on the trackback, this looks like it is probably a Python issue involving hmac and unicode as opposed to an issue with the Facebook SDK.

@martey martey closed this as completed Mar 2, 2012
@tomako
Copy link
Author

tomako commented Mar 2, 2012

Oops, you are very right, sorry.

martey added a commit that referenced this issue Jul 28, 2012
Convert strings to ASCII before passing them to HMAC. This fixes issue #22.
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