mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-22 21:31:35 +03:00
Fixed SAML issuer problem.
This commit is contained in:
parent
137e9cd2ed
commit
37e52696d9
@ -130,7 +130,7 @@ module.exports.pluginHandler = function (parent) {
|
|||||||
obj.refreshJS = function (req, res) {
|
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
|
// 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.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) {
|
obj.callHook = function (hookName, ...args) {
|
||||||
|
@ -4372,7 +4372,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
|||||||
function (profile, done) {
|
function (profile, done) {
|
||||||
parent.debug('web', 'SAML profile: ' + JSON.stringify(profile));
|
parent.debug('web', 'SAML profile: ' + JSON.stringify(profile));
|
||||||
if (typeof profile.nameID != 'string') { return done(); }
|
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.firstname == 'string') && (typeof profile.lastname == 'string')) { user.name = profile.firstname + ' ' + profile.lastname; }
|
||||||
if (typeof profile.email == 'string') { user.email = profile.email; }
|
if (typeof profile.email == 'string') { user.email = profile.email; }
|
||||||
return done(null, user);
|
return done(null, user);
|
||||||
|
Loading…
Reference in New Issue
Block a user