mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added support for banning common passwords.
This commit is contained in:
parent
23e3293aa6
commit
29a0392df3
5 changed files with 36 additions and 11 deletions
|
@ -2375,9 +2375,12 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||
parent.checkUserPassword(domain, user, command.oldpass, function (result) {
|
||||
if (result == true) {
|
||||
parent.checkOldUserPasswords(domain, user, command.newpass, function (result) {
|
||||
if (result == true) {
|
||||
if (result == 1) {
|
||||
// Send user notification of error
|
||||
displayNotificationMessage('Error, unable to change to previously used password.', 'Account Settings', 'ServerNotify');
|
||||
} else if (result == 2) {
|
||||
// Send user notification of error
|
||||
displayNotificationMessage('Error, unable to change to commonly used password.', 'Account Settings', 'ServerNotify');
|
||||
} else {
|
||||
// Update the password
|
||||
require('./pass').hash(command.newpass, function (err, salt, hash, tag) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue