Skip to content

Commit f25c433

Browse files
Update auth-oidc-proxy/auth/index.mjs
Co-authored-by: Sascha Schwarze <schwarzs@de.ibm.com>
1 parent ccec3b0 commit f25c433

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

auth-oidc-proxy/auth/index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ async function checkAuthn(req, res, next) {
137137
// This error indicates that the encrypted string couldn't get decrypted using the encryption key
138138
// maybe the cookie value has been encrypted with an old key
139139
// full error: 'error:1C800064:Provider routines::bad decrypt'
140-
if (err.message.indexOf("error:1C800064") > -1) {
140+
if (err.message.includes("error:1C800064")) {
141141
console.log(`${fn} enryption key has been changed. Deleting existing cookie`);
142142
res.clearCookie(SESSION_COOKIE);
143143
return sendJSONResponse(res, 400, { reason: "invalid_session" });

0 commit comments

Comments
 (0)