mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 00:25:27 +00:00
Fix LDAP autocomplete session to work properly with servers with search filters that are not parenthesized (bug 86144). r=leif@netscape.com, sr=darin@netscape.com
This commit is contained in:
parent
8698941da6
commit
a54d5daab7
@ -947,7 +947,19 @@ nsLDAPAutoCompleteSession::StartLDAPSearch()
|
||||
//
|
||||
nsAutoString prefix, suffix;
|
||||
if (urlFilter[0] != 0 && nsCRT::strcmp(urlFilter, "(objectclass=*)")) {
|
||||
prefix = NS_LITERAL_STRING("(&") + NS_ConvertUTF8toUCS2(urlFilter);
|
||||
|
||||
// if urlFilter isn't parenthesized, we need to add in parens so that
|
||||
// the filter works as a term to &
|
||||
//
|
||||
if (urlFilter[0] != '(') {
|
||||
prefix = NS_LITERAL_STRING("(&(") +
|
||||
NS_ConvertUTF8toUCS2(urlFilter) +
|
||||
NS_LITERAL_STRING(")");
|
||||
} else {
|
||||
prefix = NS_LITERAL_STRING("(&") +
|
||||
NS_ConvertUTF8toUCS2(urlFilter);
|
||||
}
|
||||
|
||||
suffix = PRUnichar(')');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user