View Issue Details

IDProjectCategoryView StatusLast Update
0002322SOGoBackend Address Bookpublic2017-01-06 19:57
Reportermmerlone Assigned Tojraby 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionopen 
Product Version2.0.5 
Summary0002322: LDAP filter on SOGoUserSources
Description

When not set "filter" attribute on SOGoUserSources, a search for "geral" on addressbook generates a ldap search like this:

SRCH base="dc=a1,dc=ind" scope=2 deref=0 filter="(|(sn=geral)(displayName=geral)(telephoneNumber=geral)(mail=geral)(cn=geral*))"

If set filter = "(|(objectClass=mailUser)(objectClass=mailGroup))"; it ignores any filter and generates a search like this:

SRCH base="dc=a1,dc=ind" scope=2 deref=0 filter="(objectClass=*)"

The expected filter would be an "and" like this:

"(& (|(objectClass=mailUser)(objectClass=mailGroup)) (|(sn=geral)(displayName=geral)(telephoneNumber=geral)(mail=geral)(cn=geral*)) )"

TagsNo tags attached.

Activities

jraby

jraby

2013-05-15 17:37

viewer   ~0005594

Unfortunately, the filter attribute doesn't take a LDAP filter. Please see page 17-18 of the configuration guide : http://www.sogo.nu/files/docs/SOGo%20Installation%20Guide.pdf

Can you try with this:
<pre>
filter = "(objectClass='mailUser' OR objectClass='mailGroup')";
</pre>

mmerlone

mmerlone

2013-05-15 18:05

reporter   ~0005595

Indeed, the resulting ldap search sent to the server is the expected (also using SearchFieldNames):

filter="(&(|(uid=geral)(cn=geral)(sn=geral)(givenName=geral)(mail=geral*))(|(objectClass=mailUser)(objectClass=mailGroup)))"

On the referred doc there is no explicit information that the filter attribute doesn't take a LDAP filter, just an example that is not enough to make this clear. Also, on page 20 it is documented just as "the LDAP filter", which leads to the logic conclusion that it is a plain ldap filter. Perhaps this could be more specific on the docs.

Thanks for the clarification.

jraby

jraby

2013-05-15 18:33

viewer   ~0005596

I know... I'm fixing that right now.

jraby

jraby

2013-05-15 18:54

viewer   ~0005597

fixed: https://github.com/inverse-inc/sogo/commit/1d1ed9a031f17d607b804bcb177fa106c46f6f9b

Issue History

Date Modified Username Field Change
2013-05-15 14:04 mmerlone New Issue
2013-05-15 17:37 jraby Note Added: 0005594
2013-05-15 18:05 mmerlone Note Added: 0005595
2013-05-15 18:33 jraby Note Added: 0005596
2013-05-15 18:54 jraby Note Added: 0005597
2013-05-15 18:54 jraby Assigned To => jraby
2013-05-15 18:54 jraby Status new => resolved
2017-01-06 19:57 francis Status resolved => closed