From 21b9e28b2e7b707496e18eb1300a8b8d5efd660e Mon Sep 17 00:00:00 2001 From: Byran Date: Mon, 1 Jul 2024 06:45:14 +0000 Subject: [PATCH] =?UTF-8?q?[Bug]:=20=E5=AF=B9=E8=B1=A1=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=82=B9=E5=87=BB=E6=96=B0=E5=BB=BA=E6=8A=A5?= =?UTF-8?q?401=E3=80=90macpro=2010.15=20catalina=E3=80=91=20#6951?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/auth/src/session.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/auth/src/session.ts b/packages/auth/src/session.ts index 5baee3e44b..470ec0a7b8 100644 --- a/packages/auth/src/session.ts +++ b/packages/auth/src/session.ts @@ -125,10 +125,14 @@ export async function auth(request: Request, response: Response): Promise { if (isAPIKey(spaceAuthToken)) { authToken = spaceAuthToken; } else { - if (!spaceId) { - spaceId = spaceAuthToken.split(",")[0]; + const splitSpaceId = spaceAuthToken.split(",")[0]; + const splitAuthtoken = spaceAuthToken.split(",")[1]; + if (!spaceId && splitSpaceId) { + spaceId = splitSpaceId; + } + if (splitAuthtoken) { + authToken = splitAuthtoken; } - authToken = spaceAuthToken.split(",")[1]; } }