Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

using ldap, comma in dn

51 views
Skip to first unread message

Jens Tekhaus

unread,
Jun 22, 2009, 7:22:46 AM6/22/09
to
In active directory from windows there is a comma in the distinguished
name of an user. When try to get it with a quoted character:
CN=name\, sname,OU=Domain_Benutzer,OU=group,DC=customer,DC=de
I get the following error message:

Invalid filter: malformed assertion value
while executing
"AssertionValue $val"
(procedure "ProcessSimpleMatch" line 3)
invoked from within
"ProcessSimpleMatch 3 $lhs $val"
(procedure "ProcessMatch" line 18)
invoked from within
"ProcessMatch $s"
(procedure "ProcessFilterComp" line 13)
invoked from within
"ProcessFilterComp [string range $s 1 end-1]"
(procedure "ProcessFilter" line 5)
invoked from within
"ProcessFilter $filter"
(procedure "ProcessFilterList" line 6)
invoked from within
"ProcessFilterList 0 [string range $s 1 end]"
(procedure "ProcessFilterComp" line 4)
invoked from within
"ProcessFilterComp $s"
(procedure "filter::encode" line 5)
invoked from within
"filter::encode $filterString"
(procedure "buildSearchRequest" line 5)
invoked from within
"buildSearchRequest $baseObject $scope $derefAliases $sizeLimit
$timeLimit $attrsOnly $filterString $attributes"
(procedure "searchInit" line 50)
invoked from within
"searchInit $handle $baseObject $filterString $attributes $args"
(procedure "::ldap::search" line 6)
invoked from within
"::ldap::search $handle [GetUserGroupFromDN $user_dn]
"&(objectCategory=user)(distinguishedName=$user_dn)" $filter"

When I tried it with users without comma in dn it works.

I tried to get it without \ and with double \. Nothing worked.

Who can help me? Thanks

Jens

schlenk

unread,
Jun 23, 2009, 4:39:06 AM6/23/09
to
Quoting for DNs is defined in http://www.faqs.org/rfcs/rfc1485.html

If that does not work, please file a bug at the sourceforge tracker
for tcllib.
http://sourceforge.net/projects/tcllib/ (category ldap)

Michael

Jens Tekhaus

unread,
Jun 23, 2009, 6:54:08 AM6/23/09
to
schlenk schrieb:

The solution is, that some charcters has to be quoted with their hex
values. I wrote a proc which substitutes the comma:

proc FixDN dn {
return [regsub -all {\\\,} $dn {\\5c\\2c}]
}

No it works.

Jens

0 new messages