Re: Patch: Very buggy slapd/saslauthz.c:slap_parseURI() (ITS#1681) ================ Written by Hallvard B. Furuseth and placed into the public domain. This software is not subject to any license of the University of Oslo. ================ There is one bug left in the new slap_parseURI(): Bad filters are not caught; they are treated as no filter. Here is a patch: Hallvard B. Furuseth , April 2002. diff -u2 -r servers/slapd/saslauthz.c~ servers/slapd/saslauthz.c --- servers/slapd/saslauthz.c~ Tue Apr 9 00:29:31 2002 +++ servers/slapd/saslauthz.c Mon Apr 8 23:24:22 2002 @@ -85,10 +85,14 @@ if ( ludp->lud_filter ) { *filter = str2filter( ludp->lud_filter ); + if ( *filter == NULL ) + rc = LDAP_PROTOCOL_ERROR; } /* Grab the searchbase */ - bv.bv_val = ludp->lud_dn; - bv.bv_len = strlen( bv.bv_val ); - rc = dnNormalize2( NULL, &bv, searchbase ); + if ( rc == LDAP_URL_SUCCESS ) { + bv.bv_val = ludp->lud_dn; + bv.bv_len = strlen( bv.bv_val ); + rc = dnNormalize2( NULL, &bv, searchbase ); + } ldap_free_urldesc( ludp );