Fixed SAML issuer problem.

Ylian Saint-Hilaire committed May 25, 2020 at 00:09 UTC 37e52696d958200c1d3f2803b3ad985e89f1bc0d
2 files changed +2 -2
pluginHandler.js
+1 -1
@@ -130,7 +130,7 @@ module.exports.pluginHandler = function (parent) {
130 obj.refreshJS = function (req, res) {
131 // to minimize server reboots when installing new plugins, we call the new data and overwrite the old pluginHandler on the front end
132 res.set('Content-Type', 'text/javascript');
133 - res.send('pluginHandlerBuilder = ' + obj.prepExports() + "\r\n" + ' pluginHandler = new pluginHandlerBuilder(); pluginHandler.callHook("onWebUIStartupEnd");');
133 + res.send('pluginHandlerBuilder = ' + obj.prepExports() + '\r\n' + ' pluginHandler = new pluginHandlerBuilder(); pluginHandler.callHook("onWebUIStartupEnd");');
134 }
135
136 obj.callHook = function (hookName, ...args) {
webserver.js
+1 -1
@@ -4372,7 +4372,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
4372 function (profile, done) {
4373 parent.debug('web', 'SAML profile: ' + JSON.stringify(profile));
4374 if (typeof profile.nameID != 'string') { return done(); }
4375 - var user = { sid: '~' + profile.issuer + ':' + profile.nameID, name: profile.nameID, strategy: 'saml' };
4375 + var user = { sid: '~saml:' + profile.nameID, name: profile.nameID, strategy: 'saml' };
4376 if ((typeof profile.firstname == 'string') && (typeof profile.lastname == 'string')) { user.name = profile.firstname + ' ' + profile.lastname; }
4377 if (typeof profile.email == 'string') { user.email = profile.email; }
4378 return done(null, user);