From 4ab78ff7e5f48d8d1c8f7cf564c9177b7265e267 Mon Sep 17 00:00:00 2001 From: cxykevin Date: Mon, 26 Aug 2024 18:32:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dfl=E7=9A=84=E7=99=BB=E5=BD=95?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/flarum.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugin/flarum.py b/plugin/flarum.py index 51fe7ce..20e7118 100644 --- a/plugin/flarum.py +++ b/plugin/flarum.py @@ -69,8 +69,7 @@ def main(app: FastAPI, ROOT: str, apikeys: dict): @app.post("/app/flarum/login") async def login(apikey: str, csrftoken: str, resp: Response, flarum_session: Annotated[str | None, Cookie()] = None): - apikey = apikey.replace("/", "") - username = await check_apikey(apikey) + username = await check_apikey('/'.join(list(apikey))) if (username == ""): return {"msg": "token无效"} if (flarum_session is None):