From 384cbde4f5d068a55aa760ad3507e43b0770fcd3 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 18 Sep 2001 12:21:33 +0000 Subject: [PATCH] Fix for ITS#1258 - even if we're accepting various malformed definitions, don't allow OIDs that are a mix of numeric and non-numeric fields. --- libraries/libldap/schema.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libraries/libldap/schema.c b/libraries/libldap/schema.c index ae482c3086..18a6648358 100644 --- a/libraries/libldap/schema.c +++ b/libraries/libldap/schema.c @@ -1658,8 +1658,9 @@ ldap_str2attributetype( const char * s, int * code, const char ** errp, const in savepos = ss; at->at_oid = parse_numericoid(&ss,code,0); if ( !at->at_oid ) { - if ( flags & ( LDAP_SCHEMA_ALLOW_NO_OID - | LDAP_SCHEMA_ALLOW_OID_MACRO ) ) { + if ( ( flags & ( LDAP_SCHEMA_ALLOW_NO_OID + | LDAP_SCHEMA_ALLOW_OID_MACRO ) ) + && (ss == savepos) ) { /* Backtracking */ ss = savepos; kind = get_token(&ss,&sval); @@ -2031,7 +2032,7 @@ ldap_str2objectclass( const char * s, int * code, const char ** errp, const int savepos = ss; oc->oc_oid = parse_numericoid(&ss,code,0); if ( !oc->oc_oid ) { - if ( flags & LDAP_SCHEMA_ALLOW_ALL ) { + if ( (flags & LDAP_SCHEMA_ALLOW_ALL) && (ss == savepos) ) { /* Backtracking */ ss = savepos; kind = get_token(&ss,&sval); -- 2.39.5