mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
Refuse empty old and/or new passwords
This commit is contained in:
parent
96e2da71a0
commit
e1029524b6
@ -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 );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user