Bugfix - ensure resetaccount pass is string
Noah Zalev committed
Dec 9, 2021 at 09:48 UTC
449d2c2121d12b51c5202ad0aea2e0b4ec57621b
1 file changed
+1
-1
meshcentral.js
+1
-1
@@ -829,7 +829,7 @@ function CreateMeshCentralServer(config, args) {
829
obj.db.Set(user, function () { console.log("Done."); process.exit(); return; });
830
} else {
831
// Hash the password and reset the account.
832
- require('./pass').hash(obj.args.pass, user.salt, function (err, hash, tag) { if (err) { console.log("Unable to reset password: " + err); process.exit(); return; } user.hash = hash; obj.db.Set(user, function () { console.log("Done."); process.exit(); return; }); }, 0);
832
+ require('./pass').hash(String(obj.args.pass), user.salt, function (err, hash, tag) { if (err) { console.log("Unable to reset password: " + err); process.exit(); return; } user.hash = hash; obj.db.Set(user, function () { console.log("Done."); process.exit(); return; }); }, 0);
833
}
834
});
835
return;