Skip to content
Snippets Groups Projects
Commit fd41a199 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Make sure we have a separator when doing suffix matching

parent 9f8a0e7d
Branches
Tags
No related merge requests found
......@@ -509,12 +509,16 @@ select_backend(
len = strlen( backends[i].be_nsuffix[j] );
if ( len > dnlen ) {
/* suffix is longer than DN */
continue;
}
if ( strcmp( backends[i].be_nsuffix[j],
dn + (dnlen - len) ) == 0 )
{
if ( len < dnlen && DN_SEPARATOR( dn[(dnlen-len)-1] ) ) {
/* make sure we have a separator */
continue;
}
if ( strcmp( backends[i].be_nsuffix[j], &dn[dnlen-len] ) == 0 ) {
if( be == NULL ) {
be = &backends[i];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment