mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
Fix attribute description checks
This commit is contained in:
parent
da00e5dac1
commit
6fc8c3ff4e
1 changed files with 4 additions and 9 deletions
|
|
@ -117,7 +117,7 @@ static int ldap_is_desc ( const char *str )
|
|||
return 0;
|
||||
|
||||
options:
|
||||
if( !LDAP_LDH( str[i] )) {
|
||||
if( !LDAP_LDH( str[0] )) {
|
||||
return 0;
|
||||
}
|
||||
for( i=1; str[i]; i++ ) {
|
||||
|
|
@ -508,19 +508,16 @@ put_simple_filter(
|
|||
case '<':
|
||||
ftype = LDAP_FILTER_LE;
|
||||
*s = '\0';
|
||||
if(! ldap_is_desc( str ) ) goto done;
|
||||
break;
|
||||
|
||||
case '>':
|
||||
ftype = LDAP_FILTER_GE;
|
||||
*s = '\0';
|
||||
if(! ldap_is_desc( str ) ) goto done;
|
||||
break;
|
||||
|
||||
case '~':
|
||||
ftype = LDAP_FILTER_APPROX;
|
||||
*s = '\0';
|
||||
if(! ldap_is_desc( str ) ) goto done;
|
||||
break;
|
||||
|
||||
case ':':
|
||||
|
|
@ -535,11 +532,7 @@ put_simple_filter(
|
|||
char *dn = strchr( str, ':' );
|
||||
char *rule = NULL;
|
||||
|
||||
if( dn == NULL ) {
|
||||
if(! ldap_is_desc( str ) ) goto done;
|
||||
|
||||
} else {
|
||||
|
||||
if( dn != NULL ) {
|
||||
*dn++ = '\0';
|
||||
rule = strchr( dn, ':' );
|
||||
|
||||
|
|
@ -627,6 +620,8 @@ put_simple_filter(
|
|||
} break;
|
||||
}
|
||||
|
||||
if( !ldap_is_desc( str ) ) goto done;
|
||||
|
||||
if ( ftype == LDAP_FILTER_PRESENT ) {
|
||||
rc = ber_printf( ber, "ts", ftype, str );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue