Skip to content

Commit 281efc4

Browse files
committed
Hacky fix for #207
1 parent bc8b380 commit 281efc4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

oauth2/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ def __init__(self, method=HTTP_METHOD, url=None, parameters=None,
353353
for k, v in parameters.items():
354354
k = to_unicode(k)
355355
v = to_unicode_optional_iterator(v)
356+
356357
self[k] = v
357358
self.body = body
358359
self.is_form_encoded = is_form_encoded
@@ -540,6 +541,7 @@ def from_request(cls, http_method, http_url, headers=None, parameters=None,
540541
# GET or POST query string.
541542
if query_string:
542543
query_params = cls._split_url_string(query_string)
544+
543545
parameters.update(query_params)
544546

545547
# URL parameters.
@@ -757,6 +759,8 @@ def _check_signature(self, request, consumer, token):
757759
signature = request.get('oauth_signature')
758760
if signature is None:
759761
raise MissingSignature('Missing oauth_signature.')
762+
if isinstance(signature, str):
763+
signature = signature.encode('ascii', 'ignore')
760764

761765
# Validate the signature.
762766
valid = signature_method.check(request, consumer, token, signature)

0 commit comments

Comments
 (0)