From d25bfeafa5f2c7e2a51688d0706e6ca2727e571c Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Tue, 6 Sep 2022 17:52:47 -0700 Subject: [PATCH] Minor fixes. --- meshcentral.js | 8 +------- views/default.handlebars | 1 - 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/meshcentral.js b/meshcentral.js index a7187742..9f02db35 100644 --- a/meshcentral.js +++ b/meshcentral.js @@ -3947,13 +3947,7 @@ function mainStart() { if ((typeof config.domains[i].authstrategies.reddit == 'object') && (typeof config.domains[i].authstrategies.reddit.clientid == 'string') && (typeof config.domains[i].authstrategies.reddit.clientsecret == 'string') && (passport.indexOf('passport-reddit') == -1)) { passport.push('passport-reddit'); } if ((typeof config.domains[i].authstrategies.azure == 'object') && (typeof config.domains[i].authstrategies.azure.clientid == 'string') && (typeof config.domains[i].authstrategies.azure.clientsecret == 'string') && (typeof config.domains[i].authstrategies.azure.tenantid == 'string') && (passport.indexOf('passport-azure-oauth2') == -1)) { passport.push('passport-azure-oauth2'); passport.push('jwt-simple'); } if ((typeof config.domains[i].authstrategies.oidc == 'object') && (typeof config.domains[i].authstrategies.oidc.clientid == 'string') && (typeof config.domains[i].authstrategies.oidc.clientsecret == 'string') && (typeof config.domains[i].authstrategies.oidc.issuer == 'string') && (passport.indexOf('@mstrhakr/passport-openidconnect') == -1)) { - if ((nodeVersion >= 17) || ((Math.floor(nodeVersion) == 16) && (nodeVersion >= 16.13)) || ((Math.floor(nodeVersion) == 14) && (nodeVersion >= 14.15)) || ((Math.floor(nodeVersion) == 12) && (nodeVersion >= 12.19))) { - passport.push('@mstrhakr/passport-openidconnect'); - passport.push('openid-client'); - } else { - addServerWarning('This NodeJS version does not support OpenID.', 25); - delete config.domains[i].authstrategies.oidc; - } + if ((nodeVersion >= 17) || ((Math.floor(nodeVersion) == 16) && (nodeVersion >= 16.13)) || ((Math.floor(nodeVersion) == 14) && (nodeVersion >= 14.15)) || ((Math.floor(nodeVersion) == 12) && (nodeVersion >= 12.19))) { passport.push('@mstrhakr/passport-openidconnect'); passport.push('openid-client'); } else { addServerWarning('This NodeJS version does not support OpenID.', 25); delete config.domains[i].authstrategies.oidc; } } if ((typeof config.domains[i].authstrategies.saml == 'object') || (typeof config.domains[i].authstrategies.jumpcloud == 'object')) { passport.push('passport-saml'); } } diff --git a/views/default.handlebars b/views/default.handlebars index 874362af..bcba6623 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -2322,7 +2322,6 @@ break; } case 'serverwarnings': { - console.log(message); if ((message.warnings != null) && (message.warnings.length > 0)) { var ServerWarnings = { 1: "MeshCentral SSH support requires NodeJS 11 or higher.",