mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-06 06:59:54 -05:00
ITS#5794 NUL-terminate old pw before checking
This commit is contained in:
parent
b28aa117ea
commit
8499581841
1 changed files with 5 additions and 1 deletions
|
|
@ -228,8 +228,12 @@ int passwd_extop(
|
|||
if ( rc == LDAP_SUCCESS && e ) {
|
||||
Attribute *a = attr_find( e->e_attrs,
|
||||
slap_schema.si_ad_userPassword );
|
||||
if ( a )
|
||||
if ( a ) {
|
||||
char oldNul = qpw->rs_old.bv_val[qpw->rs_old.bv_len];
|
||||
qpw->rs_old.bv_val[qpw->rs_old.bv_len] = 0;
|
||||
rc = slap_passwd_check( op, e, a, &qpw->rs_old, &rs->sr_text );
|
||||
qpw->rs_old.bv_val[qpw->rs_old.bv_len] = oldNul;
|
||||
}
|
||||
else
|
||||
rc = 1;
|
||||
be_entry_release_r( op, e );
|
||||
|
|
|
|||
Loading…
Reference in a new issue