Skip to content

Commit b320f64

Browse files
author
Ryan Leckey
committed
Merge branch 'master' into patch-1
2 parents 7a1ea76 + 14ae954 commit b320f64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

oauth2/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ def sign_request(self, signature_method, consumer, token):
555555
# section 4.1.1 "OAuth Consumers MUST NOT include an
556556
# oauth_body_hash parameter on requests with form-encoded
557557
# request bodies."
558-
self['oauth_body_hash'] = base64.b64encode(sha(self.body).digest())
558+
self['oauth_body_hash'] = base64.b64encode(sha(self.body.encode("utf-8")).digest())
559559

560560
if 'oauth_consumer_key' not in self:
561561
self['oauth_consumer_key'] = consumer.key

0 commit comments

Comments
 (0)