Refuse empty old and/or new passwords

This commit is contained in:
Kurt Zeilenga 2005-09-29 07:49:15 +00:00
parent 96e2da71a0
commit e1029524b6

View File

@ -349,6 +349,15 @@ int slap_passwd_parse( struct berval *reqdata,
goto decoding_error;
}
if( oldpass->bv_len == 0 ) {
Debug( LDAP_DEBUG_TRACE, "slap_passwd_parse: OLD empty.\n",
0, 0, 0 );
*text = "old password value is empty";
rc = LDAP_UNWILLING_TO_PERFORM;
goto done;
}
tag = ber_peek_tag( ber, &len );
}
@ -371,6 +380,15 @@ int slap_passwd_parse( struct berval *reqdata,
goto decoding_error;
}
if( newpass->bv_len == 0 ) {
Debug( LDAP_DEBUG_TRACE, "slap_passwd_parse: NEW empty.\n",
0, 0, 0 );
*text = "new password value is empty";
rc = LDAP_UNWILLING_TO_PERFORM;
goto done;
}
tag = ber_peek_tag( ber, &len );
}