Commit 509f3847 authored by Quanah Gibson-Mount's avatar Quanah Gibson-Mount
Browse files

ITS#6652

parent 2a93feaa
......@@ -65,6 +65,7 @@ OpenLDAP 2.4.24 Engineering
Fixed slapd-monitor hasSubordinates generation (ITS#6712)
Fixed slapd-sql with null objectClass (ITS#6616)
Fixed slapd-sql hasSubordinates generation (ITS#6712)
Fixed slapo-accesslog with controls (ITS#6652)
Fixed slapo-dynlist callbacks (ITS#6752)
Fixed slapo-dynlist entry handling (ITS#6752)
Fixed slapo-memberof log messages (ITS#6748)
......
......@@ -1048,6 +1048,8 @@ logSchemaControlValidate(
/* extract and check controlValue */
if ( strncasecmp( &val.bv_val[ i ], "controlValue ", STRLENOF( "controlValue " ) ) == 0 )
{
ber_len_t valueStart, valueLen;
i += STRLENOF( "controlValue " );
for ( ; i < val.bv_len; i++ ) {
if ( !ASCII_SPACE( val.bv_val[ i ] ) ) {
......@@ -1063,6 +1065,9 @@ logSchemaControlValidate(
return LDAP_INVALID_SYNTAX;
}
i++;
valueStart = i;
for ( ; i < val.bv_len; i++ ) {
if ( val.bv_val[ i ] == '"' ) {
break;
......@@ -1077,7 +1082,12 @@ logSchemaControlValidate(
return LDAP_INVALID_SYNTAX;
}
for ( ; i < val.bv_len; i++ ) {
valueLen = i - valueStart;
if ( (valueLen/2)*2 != valueLen ) {
return LDAP_INVALID_SYNTAX;
}
for ( i++; i < val.bv_len; i++ ) {
if ( !ASCII_SPACE( val.bv_val[ i ] ) ) {
break;
}
......@@ -1160,25 +1170,9 @@ accesslog_ctrls(
ber_len_t j;
ptr = lutil_strcopy( ptr, " controlValue \"" );
for ( j = 0; j < ctrls[ i ]->ldctl_value.bv_len; j++ )
{
unsigned char o;
o = ( ( ctrls[ i ]->ldctl_value.bv_val[ j ] >> 4 ) & 0xF );
if ( o < 10 ) {
*ptr++ = '0' + o;
} else {
*ptr++ = 'A' + o;
}
o = ( ctrls[ i ]->ldctl_value.bv_val[ j ] & 0xF );
if ( o < 10 ) {
*ptr++ = '0' + o;
} else {
*ptr++ = 'A' + o;
}
for ( j = 0; j < ctrls[ i ]->ldctl_value.bv_len; j++ ) {
*ptr++ = SLAP_ESCAPE_HI(ctrls[ i ]->ldctl_value.bv_val[ j ]);
*ptr++ = SLAP_ESCAPE_LO(ctrls[ i ]->ldctl_value.bv_val[ j ]);
}
*ptr++ = '"';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment