From b345375477c7d446cbf7206ccb98ed38a491e513 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 15 May 2022 03:17:17 +0200 Subject: [PATCH] fix(auth): SAML authnContext parameter should be an array (#5290) * saml auth: `authnContext` must be a list now This fixes this.options.authnContext.forEach is not a function when trying to login via SAML on wiki-js 2.5.281. Reason for that is that `authnContext` must be a list now which is apparently a breaking change that was missed while upgrading passport-saml[1]. Resolves #5289 [1] https://github.com/node-saml/passport-saml/pull/615 * fix(auth): split authnContext for SAML authenticaiton module Co-authored-by: Nicolas Giard --- server/modules/authentication/saml/authentication.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/authentication/saml/authentication.js b/server/modules/authentication/saml/authentication.js index c0771381..e1c75d15 100644 --- a/server/modules/authentication/saml/authentication.js +++ b/server/modules/authentication/saml/authentication.js @@ -21,7 +21,7 @@ module.exports = { wantAssertionsSigned: conf.wantAssertionsSigned, acceptedClockSkewMs: _.toSafeInteger(conf.acceptedClockSkewMs), disableRequestedAuthnContext: conf.disableRequestedAuthnContext, - authnContext: conf.authnContext, + authnContext: _.split(conf.authnContext, '|'), racComparison: conf.racComparison, forceAuthn: conf.forceAuthn, passive: conf.passive,