mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 00:27:41 +01:00
catch typeerror in csrf token and return false
This commit is contained in:
@@ -160,7 +160,7 @@ class CSRFMiddleware:
|
||||
and decoded_doc_cookie["user_id"] == user_id
|
||||
and decoded_header_cookie["user_id"] == user_id
|
||||
)
|
||||
except BadSignature:
|
||||
except (TypeError, BadSignature):
|
||||
return False
|
||||
|
||||
def _get_error_response(self, request: Request) -> Response:
|
||||
|
||||
Reference in New Issue
Block a user