Skip to content

Commit cc043a1

Browse files
authored
Merge pull request #224 from chilic/master
fix problem with python3.6
2 parents 6689960 + 631e8a5 commit cc043a1

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
@@ -490,7 +490,7 @@ def sign_request(self, signature_method, consumer, token):
490490
# section 4.1.1 "OAuth Consumers MUST NOT include an
491491
# oauth_body_hash parameter on requests with form-encoded
492492
# request bodies."
493-
self['oauth_body_hash'] = base64.b64encode(sha1(self.body).digest())
493+
self['oauth_body_hash'] = base64.b64encode(sha1(to_utf8(self.body)).digest())
494494

495495
if 'oauth_consumer_key' not in self:
496496
self['oauth_consumer_key'] = consumer.key

0 commit comments

Comments
 (0)