mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-04-08 05:35:29 -04:00
upgrade otplib to 12.0.1 #6912
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
59204bc3fb
commit
46e6ddb8fc
@ -89,7 +89,7 @@ RUN cd meshcentral && npm install
|
||||
|
||||
# NOTE: ALL MODULES MUST HAVE A VERSION NUMBER AND THE VERSION MUST MATCH THAT USED IN meshcentral.js mainStart()
|
||||
RUN if ! [ -z "$INCLUDE_MONGODBTOOLS" ]; then cd meshcentral && npm install mongodb@4.13.0 saslprep@1.0.3; fi
|
||||
RUN if ! [ -z "$PREINSTALL_LIBS" ] && [ "$PREINSTALL_LIBS" == "true" ]; then cd meshcentral && npm install ssh2@1.16.0 semver@7.5.4 nodemailer@6.9.15 image-size@1.1.1 wildleek@2.0.0 otplib@10.2.3 yubikeyotp@0.2.0; fi
|
||||
RUN if ! [ -z "$PREINSTALL_LIBS" ] && [ "$PREINSTALL_LIBS" == "true" ]; then cd meshcentral && npm install ssh2@1.16.0 semver@7.5.4 nodemailer@6.9.15 image-size@1.1.1 wildleek@2.0.0 otplib@12.0.1 yubikeyotp@0.2.0; fi
|
||||
|
||||
EXPOSE 80 443 4433
|
||||
|
||||
|
@ -4299,7 +4299,7 @@ function mainStart() {
|
||||
if (config.settings.no2factorauth !== true) {
|
||||
// Setup YubiKey OTP if configured
|
||||
if (yubikey == true) { modules.push('yubikeyotp@0.2.0'); } // Add YubiKey OTP support
|
||||
if (allsspi == false) { modules.push('otplib@10.2.3'); } // Google Authenticator support (v10 supports older NodeJS versions).
|
||||
if (allsspi == false) { modules.push('otplib@12.0.1'); } // Google Authenticator support (v10 supports older NodeJS versions).
|
||||
}
|
||||
|
||||
// Desktop multiplexor support
|
||||
|
@ -3695,7 +3695,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
||||
} else if (domain.dns == null && domain.id != '') {
|
||||
domainName += "/" + domain.id;
|
||||
}
|
||||
ws.send(JSON.stringify({ action: 'otpauth-request', secret: secret, url: otplib.authenticator.keyuri(encodeURIComponent(user.name), domainName, secret) }));
|
||||
ws.send(JSON.stringify({ action: 'otpauth-request', secret: secret, url: otplib.authenticator.keyuri(user.name, domainName, secret) }));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user