Timothy Jaeryang Baek 5 月之前
父节点
当前提交
addf44b21f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      backend/open_webui/routers/auths.py

+ 1 - 1
backend/open_webui/routers/auths.py

@@ -84,7 +84,7 @@ async def get_session_user(
     data = decode_token(token)
     expires_at = data.get("exp")
 
-    if int(time.time()) > expires_at:
+    if (expires_at is not None) and int(time.time()) > expires_at:
         raise HTTPException(
             status_code=status.HTTP_401_UNAUTHORIZED,
             detail=ERROR_MESSAGES.INVALID_TOKEN,