mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-27 17:19:19 -05:00
Refuse empty old and/or new passwords
This commit is contained in:
parent
96e2da71a0
commit
e1029524b6
1 changed files with 18 additions and 0 deletions
|
|
@ -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 a new issue