This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.3.6
in repository 389-ds-base.
commit 689b38861bccf209d323ef1b5966b6476fd7e65b
Author: Mark Reynolds <mreynolds(a)redhat.com>
Date: Mon Jan 8 11:39:55 2018 -0500
Ticket 49524 - Password policy: minimum token length fails
when the token length is equal to attribute length
Bug Description: The token checking breaks when the password is the
exact value of the entry attribute.
Fix Description: Remove the "equal" part of the string comparisons.
https://pagure.io/389-ds-base/issue/49524
---
ldap/servers/slapd/pw.c | 2 +-
ldap/servers/slapd/utf8.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ldap/servers/slapd/pw.c b/ldap/servers/slapd/pw.c
index ea8f6b1..9013585 100644
--- a/ldap/servers/slapd/pw.c
+++ b/ldap/servers/slapd/pw.c
@@ -1517,7 +1517,7 @@ check_trivial_words (Slapi_PBlock *pb, Slapi_Entry *e, Slapi_Value
**vals, char
sp = slapi_ch_strdup(slapi_value_get_string(valp));
ep = sp + strlen(sp);
ep = ldap_utf8prevn(sp, ep, toklen);
- if (!ep || (sp >= ep)) {
+ if (!ep || (sp > ep)) {
slapi_ch_free_string(&sp);
continue;
}
diff --git a/ldap/servers/slapd/utf8.c b/ldap/servers/slapd/utf8.c
index 27843c0..d8e79eb 100644
--- a/ldap/servers/slapd/utf8.c
+++ b/ldap/servers/slapd/utf8.c
@@ -132,7 +132,7 @@ ldap_utf8prevn (char *s, char *from, int n)
}
for ( ;n > 0; --n) {
prev = ldap_utf8prev(prev);
- if ((prev <= s) && (n > 0)) {
+ if ((n > 0) && (prev < s)) {
return NULL;
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.