From 0437716905455ebb95d7e726509b81de88b85659 Mon Sep 17 00:00:00 2001 From: Brock Allen Date: Sat, 31 Aug 2019 09:52:38 -0400 Subject: [PATCH] bug not checking null state on signin response processing #931 --- src/OidcClient.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/OidcClient.js b/src/OidcClient.js index ff1e5eff..b5b69fa0 100644 --- a/src/OidcClient.js +++ b/src/OidcClient.js @@ -207,8 +207,14 @@ export class OidcClient { Log.debug("OidcClient.processSignoutResponse"); return this.readSignoutResponseState(url, stateStore, true).then(({state, response}) => { - Log.debug("OidcClient.processSignoutResponse: Received state from storage; validating response"); - return this._validator.validateSignoutResponse(state, response); + if (state) { + Log.debug("OidcClient.processSignoutResponse: Received state from storage; validating response"); + return this._validator.validateSignoutResponse(state, response); + } + else { + Log.debug("OidcClient.processSignoutResponse: No state from storage; skipping validating response"); + return response; + } }); }