mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 18:16:36 +02:00
fix: #7472
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
/* global zxcvbn */
|
||||
|
||||
$('document').ready(function () {
|
||||
setupInputs();
|
||||
@@ -75,6 +76,9 @@ $('document').ready(function () {
|
||||
} else if (field.length < $('[name="admin:password"]').attr('data-minimum-length')) {
|
||||
parent.addClass('error');
|
||||
help.html('Password is too short.');
|
||||
} else if (zxcvbn(field).score < parseInt($('[name="admin:password"]').attr('data-minimum-strength'), 10)) {
|
||||
parent.addClass('error');
|
||||
help.html('Password is too weak.');
|
||||
} else {
|
||||
parent.removeClass('error');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user