Explorar o código

fix(auth): handle null SAML authnContext context

Nicolas Giard %!s(int64=3) %!d(string=hai) anos
pai
achega
5d0f882fed
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      server/modules/authentication/saml/authentication.js

+ 2 - 2
server/modules/authentication/saml/authentication.js

@@ -14,14 +14,14 @@ module.exports = {
       callbackUrl: conf.callbackURL,
       entryPoint: conf.entryPoint,
       issuer: conf.issuer,
-      cert: _.split(conf.cert || '', '|'),
+      cert: (conf.cert || '').split('|'),
       signatureAlgorithm: conf.signatureAlgorithm,
       digestAlgorithm: conf.digestAlgorithm,
       identifierFormat: conf.identifierFormat,
       wantAssertionsSigned: conf.wantAssertionsSigned,
       acceptedClockSkewMs: _.toSafeInteger(conf.acceptedClockSkewMs),
       disableRequestedAuthnContext: conf.disableRequestedAuthnContext,
-      authnContext: _.split(conf.authnContext, '|'),
+      authnContext: (conf.authnContext || '').split('|'),
       racComparison: conf.racComparison,
       forceAuthn: conf.forceAuthn,
       passive: conf.passive,