diff options
author | Tomas Mraz <tmraz@fedoraproject.org> | 2022-11-18 11:06:31 +0100 |
---|---|---|
committer | Tomas Mraz <tmraz@fedoraproject.org> | 2022-11-18 11:06:31 +0100 |
commit | a8dc5c19bfde5b75099bfeb4fb7428e590f1c6e4 (patch) | |
tree | 95cafd9c091970fb782b995c266268c7dfd9fe17 | |
parent | b5c7b49c32e4ab76c0c16de90019b3088ea7527b (diff) | |
download | libpwquality-git-a8dc5c19bfde5b75099bfeb4fb7428e590f1c6e4.tar.gz |
Move the palindrome check later
Otherwise it triggers for trivial passwords.
Fixes #58
-rw-r--r-- | src/check.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/check.c b/src/check.c index 5253e51..3696d44 100644 --- a/src/check.c +++ b/src/check.c @@ -565,9 +565,6 @@ password_check(pwquality_settings_t *pwq, } } - if (!rv && palindrome(newmono)) - rv = PWQ_ERROR_PALINDROME; - if (!rv && oldmono && strcmp(oldmono, newmono) == 0) rv = PWQ_ERROR_CASE_CHANGES_ONLY; @@ -587,6 +584,9 @@ password_check(pwquality_settings_t *pwq, } } + if (!rv && palindrome(newmono)) + rv = PWQ_ERROR_PALINDROME; + if (!rv && consecutive(pwq, new, auxerror)) rv = PWQ_ERROR_MAX_CONSECUTIVE; |