mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-11-07 04:42:54 -05:00
replace yubikeyotp to avoid form-data cve
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
@@ -1073,10 +1073,9 @@ module.exports.CreateWebServer = function (parent, db, args, certificates, doneF
|
||||
|
||||
// If we have a match, check the OTP
|
||||
if (match === true) {
|
||||
var yubikeyotp = require('yubikeyotp');
|
||||
var request = { otp: token, id: domain.yubikey.id, key: domain.yubikey.secret, timestamp: true }
|
||||
if (domain.yubikey.proxy) { request.requestParams = { proxy: domain.yubikey.proxy }; }
|
||||
yubikeyotp.verifyOTP(request, function (err, results) {
|
||||
var yub = require('yub');
|
||||
yub.init(domain.yubikey.id, domain.yubikey.secret);
|
||||
yub.verify(token, function (err, results) {
|
||||
if ((results != null) && (results.status == 'OK')) {
|
||||
parent.debug('web', 'checkUserOneTimePassword: success (Yubikey).');
|
||||
func(true, { twoFactorType: 'hwotp' });
|
||||
|
||||
Reference in New Issue
Block a user