From: Kurt Zeilenga Date: Wed, 10 Jul 2002 22:04:14 +0000 (+0000) Subject: make sure we don't test against stored values starting with "{" X-Git-Tag: NO_SLAP_OP_BLOCKS~1375 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7592a9b9c71786070053677d16f93b5e5daa2d3c;p=openldap make sure we don't test against stored values starting with "{" --- diff --git a/libraries/liblutil/passwd.c b/libraries/liblutil/passwd.c index 7a04154b98..3fc5e6f455 100644 --- a/libraries/liblutil/passwd.c +++ b/libraries/liblutil/passwd.c @@ -328,7 +328,8 @@ lutil_passwd( #ifdef SLAPD_CLEARTEXT 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 ) : 1; }