From c988e67104afb4f7e83e78f920244eaf13a362a6 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Mon, 25 May 2020 00:09:35 -0700 Subject: [PATCH] Fixed SAML issuer problem. --- pluginHandler.js | 2 +- webserver.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pluginHandler.js b/pluginHandler.js index ea31b949..8f62e0c4 100644 --- a/pluginHandler.js +++ b/pluginHandler.js @@ -130,7 +130,7 @@ module.exports.pluginHandler = function (parent) { obj.refreshJS = function (req, res) { // to minimize server reboots when installing new plugins, we call the new data and overwrite the old pluginHandler on the front end res.set('Content-Type', 'text/javascript'); - res.send('pluginHandlerBuilder = ' + obj.prepExports() + "\r\n" + ' pluginHandler = new pluginHandlerBuilder(); pluginHandler.callHook("onWebUIStartupEnd");'); + res.send('pluginHandlerBuilder = ' + obj.prepExports() + '\r\n' + ' pluginHandler = new pluginHandlerBuilder(); pluginHandler.callHook("onWebUIStartupEnd");'); } obj.callHook = function (hookName, ...args) { diff --git a/webserver.js b/webserver.js index 90300df4..6ffb1062 100644 --- a/webserver.js +++ b/webserver.js @@ -4372,7 +4372,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { function (profile, done) { parent.debug('web', 'SAML profile: ' + JSON.stringify(profile)); if (typeof profile.nameID != 'string') { return done(); } - var user = { sid: '~' + profile.issuer + ':' + profile.nameID, name: profile.nameID, strategy: 'saml' }; + var user = { sid: '~saml:' + profile.nameID, name: profile.nameID, strategy: 'saml' }; if ((typeof profile.firstname == 'string') && (typeof profile.lastname == 'string')) { user.name = profile.firstname + ' ' + profile.lastname; } if (typeof profile.email == 'string') { user.email = profile.email; } return done(null, user);