Item10504: cache creation: "LdapContrib 89: Bad filter"

pencil
Priority: Low
Current State: No Action Required
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: LdapContrib
Branches:
Reported By: AchimFischer
Waiting For:
Last Change By: MichaelDaum
Hello,

I set up a new wiki and installed LdapContrib, LdapNgPlugin and NewUserPlugin using the Extensions interface. While creating/updating the ldap-cache I got error "LdapContrib - 89: Bad filter". While checking my installation I could track the problem to line 533 in LdapContrib.pm:

$args{filter} = $this->toUtf8($args{filter}) if $args{filter};

I'm not very familiar with perl but changing it to

$args{filter} = $this->toUtf8($args{filter}) if defined($args{filter});

worked for me. My question: Is this a bug or am I using the wrong perl modules?

Best regard,

Achim Fischer

-- AchimFischer - 18 Mar 2011

Hi Achim, your changes look fine, though I am not sure why the previous code produced an error for you: what exactly is the value of your filter param?

-- MichaelDaum - 18 Mar 2011

Hello Michael, Thanks for your quick reply. My filter is objectClass=posixAccount. When using the original code I got an empty filter. That means I got
LdapContrib - called search(filter=, base=ou=users,dc=my,dc=domain, scope=one, limit=0, attrs=uid,mail,gidNumber,givenName,sn)
But now I'm really confused: the original code is working, too. Generally: When making changes to the configuration and/or installing/uninstalling perl modules - do I have to restart apache and/or my browser session? I think then it might have been a 'cached' faulty setting which produced the error. Sorry!

-- AchimFischer - 18 Mar 2011

If you are using FastCGI or mod_perl then yes, you will definitely have to reload/restart the webserver for new perl code to be loaded. From your comments I conclude that the original code was just fine as well, maybe even more correct as an empty filter isn't added to the search expression. For now I close this bug with no-action-required. Feel free to reopen it in case you find out more about it. Thanks.

-- MichaelDaum - 19 Mar 2011

ItemTemplate edit

Summary cache creation: "LdapContrib 89: Bad filter"
ReportedBy AchimFischer
Codebase 1.1.2
SVN Range
AppliesTo Extension
Component LdapContrib
Priority Low
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
Topic revision: r4 - 19 Mar 2011, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy