mirror of
https://github.com/wassname/flask-security.git
synced 2026-07-15 01:10:54 +08:00
catch possible TypeError and ValueError from serializer
This commit is contained in:
@@ -315,6 +315,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])
|
||||
|
||||
Reference in New Issue
Block a user