mirror of
https://github.com/janeczku/calibre-web
synced 2025-10-28 05:47:43 +00:00
password validation working
This commit is contained in:
@@ -25,10 +25,6 @@ var i18n = {};
|
||||
wordTwoCharacterClasses: 'Use different character classes',
|
||||
wordRepetitions: 'Too many repetitions',
|
||||
wordSequences: 'Your password contains sequences',
|
||||
// wordLowercase: "Use at least one lowercase character",
|
||||
// wordUppercase: "Use at least one uppercase character",
|
||||
// wordOneNumber: "Use at least one number",
|
||||
// wordOneSpecialChar: "Use at least one special character",
|
||||
errorList: 'Errors:',
|
||||
veryWeak: 'Very Weak',
|
||||
weak: 'Weak',
|
||||
@@ -376,7 +372,7 @@ defaultOptions.rules.activated = {
|
||||
wordIsACommonPassword: true
|
||||
};
|
||||
defaultOptions.rules.raisePower = 1.4;
|
||||
defaultOptions.rules.specialCharClass = '[!,@,#,$,%,^,&,*,?,_,~]';
|
||||
defaultOptions.rules.specialCharClass = "(?=.*?[^A-Za-z\s0-9])"; //'[!,@,#,$,%,^,&,*,?,_,~]';
|
||||
// List taken from https://github.com/danielmiessler/SecLists (MIT License)
|
||||
defaultOptions.rules.commonPasswords = [
|
||||
'123456',
|
||||
|
||||
@@ -37,20 +37,21 @@ $(document).ready(function() {
|
||||
showVerdicts: false,
|
||||
}
|
||||
options.rules= {
|
||||
specialCharClass: "(?=.*?[^A-Za-z\\s0-9])",
|
||||
activated: {
|
||||
wordNotEmail: false,
|
||||
wordMinLength: $('#password').data("min") ? true : false,
|
||||
wordMinLength: $('#password').data("min"),
|
||||
// wordMaxLength: false,
|
||||
// wordInvalidChar: true,
|
||||
wordSimilarToUsername: false,
|
||||
wordSequences: false,
|
||||
wordTwoCharacterClasses: false,
|
||||
wordRepetitions: false,
|
||||
wordLowercase: $('#password').data("lower") ? true : false,
|
||||
wordUppercase: $('#password').data("upper") ? true : false,
|
||||
wordOneNumber: $('#password').data("number") ? true : false,
|
||||
wordLowercase: $('#password').data("lower") === "True" ? true : false,
|
||||
wordUppercase: $('#password').data("upper") === "True" ? true : false,
|
||||
wordOneNumber: $('#password').data("number") === "True" ? true : false,
|
||||
wordThreeNumbers: false,
|
||||
wordOneSpecialChar: $('#password').data("special") ? true : false,
|
||||
wordOneSpecialChar: $('#password').data("special") === "True" ? true : false,
|
||||
// wordTwoSpecialChar: true,
|
||||
wordUpperLowerCombo: false,
|
||||
wordLetterNumberCombo: false,
|
||||
|
||||
Reference in New Issue
Block a user