Closed Bug 86144 Opened 23 years ago Closed 23 years ago

ldap url search filter assumes parentheses

Categories

(Directory :: LDAP XPCOM SDK, defect, P2)

PowerPC
Mac System 9.x

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.3

People

(Reporter: mwyner, Assigned: dmosedale)

Details

Attachments

(1 file)

1) Create a new ldap directory instance to use for addressing
2) Under the "advanced tab" in the prefs for that server, put in objectclass=*
for the search filter. Also fill out all the other prefs.
3) Quit and restart the browser, and then create a new message, put something in
the "to" field and watch the browser connect to the ldap server.
Notice it doesn't work. It will connect to the server, but it will not actually
do a search.

However, the default search filter if you don't put anything in that field is
(objectclass=*) which will work without a problem.

The code however should not assume there are parens there since the search
filter without the parens is valid.
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla0.9.3
Attached patch patch, v1Splinter Review
Looks good, r=leif.

-- Leif
from irc:

<darin> wouldn't it be more efficient to use operator+= instead of operator+ ?
<dmose> where?
<darin> prefix = NS_LITERAL_STRING("(&");
<darin> prefix += NS_ConvertUTF8toUCS2(urlFilter);
<darin> etc.
<dmose> hmmmm
<darin> scc would know better than i, but i thought that operator+ always
involved an extra copy
Talked the string fu over with scc and darin in irc, and it turns out the patch
as it stands will be fastest, because there will be one single allocation rather
than multiple allocations.

From my irc window:

<darin> sr=darin
Fix checked into the trunk.
Whiteboard: fix checked into trunk; would like approval for branch checkin
Nominating for nsBranch.
Keywords: nsBranch
This isn't gonna be accepted on the branch.  Since it is fixed on the trunk,
resolving.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Keywords: nsBranch
Resolution: --- → FIXED
Whiteboard: fix checked into trunk; would like approval for branch checkin
Verified with 2001080603 Windows trunck build.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: