瀏覽代碼

We should verify signatures to make the whole session secret meaningful.

Tim Farrell 1 年之前
父節點
當前提交
2c1dacb9b6
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      backend/utils/utils.py

+ 1 - 1
backend/utils/utils.py

@@ -48,7 +48,7 @@ def create_token(data: dict, expires_delta: Union[timedelta, None] = None) -> st
 
 def decode_token(token: str) -> Optional[dict]:
     try:
-        decoded = jwt.decode(token, SESSION_SECRET, options={"verify_signature": False})
+        decoded = jwt.decode(token, SESSION_SECRET)
         return decoded
     except Exception as e:
         return None