diff --git a/changelogs/unreleased/token.json b/changelogs/unreleased/token.json new file mode 100644 index 0000000000..1e88ecaeb4 --- /dev/null +++ b/changelogs/unreleased/token.json @@ -0,0 +1,5 @@ +{ + "title": "Login: allow session cookie with - character", + "type": "fix", + "packages": "core" +} diff --git a/packages/core/src/api/login-api.ts b/packages/core/src/api/login-api.ts index 3bc60f0071..c1c933a7a2 100644 --- a/packages/core/src/api/login-api.ts +++ b/packages/core/src/api/login-api.ts @@ -25,7 +25,7 @@ import { } from '../apiProviders'; const LOGIN_PATH = 'callback'; -const SESSION_REGEX = /JSESSIONID=\w+/g; +const SESSION_REGEX = /JSESSIONID=([^;]*);/g; const getJsessionId = (cookie: string) => { return cookie?.match(SESSION_REGEX)?.[0];