Skip to content

Commit 46e6ddb

Browse files
committed
upgrade otplib to 12.0.1 #6912
Signed-off-by: si458 <simonsmith5521@gmail.com>
1 parent 59204bc commit 46e6ddb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ RUN cd meshcentral && npm install
8989

9090
# NOTE: ALL MODULES MUST HAVE A VERSION NUMBER AND THE VERSION MUST MATCH THAT USED IN meshcentral.js mainStart()
9191
RUN if ! [ -z "$INCLUDE_MONGODBTOOLS" ]; then cd meshcentral && npm install mongodb@4.13.0 saslprep@1.0.3; fi
92-
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
92+
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
9393

9494
EXPOSE 80 443 4433
9595

meshcentral.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4299,7 +4299,7 @@ function mainStart() {
42994299
if (config.settings.no2factorauth !== true) {
43004300
// Setup YubiKey OTP if configured
43014301
if (yubikey == true) { modules.push('yubikeyotp@0.2.0'); } // Add YubiKey OTP support
4302-
if (allsspi == false) { modules.push('otplib@10.2.3'); } // Google Authenticator support (v10 supports older NodeJS versions).
4302+
if (allsspi == false) { modules.push('otplib@12.0.1'); } // Google Authenticator support (v10 supports older NodeJS versions).
43034303
}
43044304

43054305
// Desktop multiplexor support

meshuser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3695,7 +3695,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
36953695
} else if (domain.dns == null && domain.id != '') {
36963696
domainName += "/" + domain.id;
36973697
}
3698-
ws.send(JSON.stringify({ action: 'otpauth-request', secret: secret, url: otplib.authenticator.keyuri(encodeURIComponent(user.name), domainName, secret) }));
3698+
ws.send(JSON.stringify({ action: 'otpauth-request', secret: secret, url: otplib.authenticator.keyuri(user.name, domainName, secret) }));
36993699
}
37003700
break;
37013701
}

0 commit comments

Comments
 (0)