From 9b85129b8b7f1d885969d91db12d65c7659bd08a Mon Sep 17 00:00:00 2001 From: Trey Hayden <33755714+vbhayden@users.noreply.github.com> Date: Mon, 16 Oct 2023 14:01:10 -0400 Subject: [PATCH 1/2] null check for p1 auth token adding null check for p1 auth token --- src/main/server/shims/auth.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/server/shims/auth.js b/src/main/server/shims/auth.js index aef729d4a..2624f7d36 100644 --- a/src/main/server/shims/auth.js +++ b/src/main/server/shims/auth.js @@ -235,6 +235,9 @@ if (process.env.CASS_PLATFORM_ONE_AUTH_ENABLED) */ function validateJwt (token) { + if (token == null) + return false; + let checkIssuer = interpretEnvFlag(process.env.CASS_PLATFORM_ONE_AUTH_CHECK_ISSUER); if (checkIssuer) { let expectedIssuer = process.env.CASS_PLATFORM_ONE_ISSUER; From f56e1dd620f1a0e1aedcbb7254e0931c025adbc2 Mon Sep 17 00:00:00 2001 From: Trey Hayden <33755714+vbhayden@users.noreply.github.com> Date: Mon, 16 Oct 2023 14:02:30 -0400 Subject: [PATCH 2/2] fixing whitespace --- src/main/server/shims/auth.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/server/shims/auth.js b/src/main/server/shims/auth.js index 2624f7d36..28339412c 100644 --- a/src/main/server/shims/auth.js +++ b/src/main/server/shims/auth.js @@ -235,8 +235,8 @@ if (process.env.CASS_PLATFORM_ONE_AUTH_ENABLED) */ function validateJwt (token) { - if (token == null) - return false; + if (token == null) + return false; let checkIssuer = interpretEnvFlag(process.env.CASS_PLATFORM_ONE_AUTH_CHECK_ISSUER); if (checkIssuer) {