Merge pull request #205 from HereLabsInc/catch_decoding_errors

catch possible TypeError and ValueError from serializer
This commit is contained in:
Matt Wright
2014-01-24 07:31:51 -08:00
2 changed files with 14 additions and 0 deletions
+4
View File
@@ -318,6 +318,10 @@ def get_token_status(token, serializer, max_age=None):
expired = True
except BadSignature:
invalid = True
except TypeError:
invalid = True
except ValueError:
invalid = True
if data:
user = _datastore.find_user(id=data[0])