diff --git a/piston/store.py b/piston/store.py index f0642ad..6804ab4 100644 --- a/piston/store.py +++ b/piston/store.py @@ -13,6 +13,11 @@ def __init__(self, oauth_request): def lookup_consumer(self, key): try: self.consumer = Consumer.objects.get(key=key) + + # LOGGLY-1675, Unicoded Consumers cause hmac.new() to raise TypeError + self.consumer.key = self.consumer.key.encode('ascii') + self.consumer.secret = self.consumer.secret.encode('ascii') + return self.consumer except Consumer.DoesNotExist: return None