make sure we don't test against stored values starting with "{"

This commit is contained in:
Kurt Zeilenga 2002-07-10 22:04:14 +00:00
parent 0fffad53c3
commit 7592a9b9c7

View file

@ -328,7 +328,8 @@ lutil_passwd(
#ifdef SLAPD_CLEARTEXT #ifdef SLAPD_CLEARTEXT
if( is_allowed_scheme("{CLEARTEXT}", schemes ) ) { if( is_allowed_scheme("{CLEARTEXT}", schemes ) ) {
return passwd->bv_len == cred->bv_len return (( passwd->bv_len == cred->bv_len ) &&
( passwd->bv_val[0] != '{' /*'}'*/ ))
? memcmp( passwd->bv_val, cred->bv_val, passwd->bv_len ) ? memcmp( passwd->bv_val, cred->bv_val, passwd->bv_len )
: 1; : 1;
} }