6.0.0-git
2019-03-21

[#9196] H4: Userlist empty (in admin gui)
Summary H4: Userlist empty (in admin gui)
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State No Feedback
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester hutter (at) ihs (dot) ac (dot) at
Created 2010-08-24 (3131 days ago)
Due
Updated 2011-07-01 (2820 days ago)
Assigned 2010-09-23 (3101 days ago)
Resolved 2011-07-01 (2820 days ago)
Milestone
Patch Yes

History
2011-07-01 20:14:44 Jan Schneider State ⇒ No Feedback
 
2011-05-18 16:25:28 Jan Schneider Comment #14 Reply to this comment
Is anybody still seeing this in the latest releases?
2010-11-16 14:24:34 gerard (dot) breiner (at) ias (dot) u-psud (dot) fr Comment #13 Reply to this comment

[Show Quoted Text - 33 lines]
Hello,

I have the same problem after a "git pull". It happens after login, I 
get a page with tis message :

PHP Catchable fatal error:  Argument 1 passed to
Horde_Ldap_Filter::build() must be an array, null given, called in
/srv/www/htdocs/github/horde/framework/Ldap/lib/Horde/Ldap.php on line
864 and defined in
/srv/www/htdocs/github/horde/framework/Ldap/lib/Horde/Ldap/Filter.php
on line 274

An idea please ?

Best regards

Gerard
2010-10-20 16:39:24 hutter (at) ihs (dot) ac (dot) at Comment #12 Reply to this comment

[Show Quoted Text - 20 lines]
I tried to start with a new configuration (copied 
horde/conf/conf.php.dist to conf.php), just to make sure there is 
nothing messed up, ut got the error again.
The comment above the function findUserDN says:
'This method requires the 'user' configuration parameter to be set.'

What is meant with this? Where should I find this configuration 
parameter? grepping my conf.xml I couldn't find a parameter 'user' nor 
does 'grep config conf.xml | grep user' or 'grep "name=\"user\"" 
conf.xml find anyting which seems to be useful.

2010-09-27 09:39:11 hutter (at) ihs (dot) ac (dot) at Comment #11
New Attachment: login.php-backtrace.zip Download
Reply to this comment
Mhhhmm, not sure what you mean with backtrace...
Add a:
var_dump(debug_backtrace());
statement on line 864 of 
/srv/www/htdocs/github/horde/framework/Ldap/lib/Horde/Ldap.php 
(right about the build() call) and post (or better upload) the 
output here.
Lines 862 to 865 are:
         $filter = Horde_Ldap_Filter::combine(
             'and',
             array(Horde_Ldap_Filter::build($this->_config['user']),
                   
Horde_Ldap_Filter::create($this->_config['user']['uid'], 'equals', 
$user)));

Putting var_dump between 'and' and 'array' breaks the syntax 
(uexpected ';'). I placed it immediately before 'filter'.

Attached an obfuscated (usernames, pw's, servernames..) backtrace.
2010-09-24 08:09:51 Jan Schneider Comment #10 Reply to this comment
Mhhhmm, not sure what you mean with backtrace...
Add a:
var_dump(debug_backtrace());
statement on line 864 of 
/srv/www/htdocs/github/horde/framework/Ldap/lib/Horde/Ldap.php (right 
about the build() call) and post (or better upload) the output here.
2010-09-23 17:24:29 hutter (at) ihs (dot) ac (dot) at Comment #9 Reply to this comment
Looks good (though I wonder why don't use the LDAP default 
configuration in auth and groups). Still can't reproduce it though. 
Can you post a backtrace from the place where the error is raised?
Mhhhmm, not sure what you mean with backtrace...

When I log in as admin I get an empty page, the error is from the 
apache log, there is nothing in the horde log.
2010-09-23 16:58:32 Jan Schneider Comment #8 Reply to this comment
Looks good (though I wonder why don't use the LDAP default 
configuration in auth and groups). Still can't reproduce it though. 
Can you post a backtrace from the place where the error is raised?
2010-09-23 16:33:49 hutter (at) ihs (dot) ac (dot) at Comment #7 Reply to this comment
Please paste the *complete* ldap, auth, and group config settings.
Settings (Hostnames, user and password obfuscated):

$conf['ldap']['hostspec'] = 'DC1.subdomain.ihs.ac.at DC2.subdomain.ihs.ac.at';
$conf['ldap']['tls'] = false;
$conf['ldap']['version'] = 3;
$conf['ldap']['binddn'] = 'binduser';
$conf['ldap']['bindpw'] = 'bindpassword';
$conf['ldap']['bindas'] = 'admin';
$conf['ldap']['useldap'] = true;
$conf['auth']['admins'] = array('adm1', 'adm2', 'adm3', 'adm4');
$conf['auth']['checkip'] = true;
$conf['auth']['checkbrowser'] = true;
$conf['auth']['alternate_login'] = false;
$conf['auth']['redirect_on_logout'] = false;
$conf['auth']['list_users'] = 'list';
$conf['auth']['params']['hostspec'] = 'DC1.subdomain.ihs.ac.at 
DC2.subdomain.ihs.ac.at';
$conf['auth']['params']['tls'] = false;
$conf['auth']['params']['version'] = 3;
$conf['auth']['params']['binddn'] = 'binduser';
$conf['auth']['params']['bindpw'] = 'bindpassword';
$conf['auth']['params']['bindas'] = 'admin';
$conf['auth']['params']['basedn'] = 'ou=xyz,dc=subdomain,dc=ihs,dc=ac,dc=at';
$conf['auth']['params']['scope'] = 'sub';
$conf['auth']['params']['ad'] = true;
$conf['auth']['params']['uid'] = 'sAMAccountName';
$conf['auth']['params']['encryption'] = 'ssha';
$conf['auth']['params']['newuser_objectclass'] = 
array('shadowAccount', 'inetOrgPerson');
$conf['auth']['params']['filter'] = 
'(&(&(objectclass=user)(!(objectclass=computer))))';
$conf['auth']['params']['password_expiration'] = 'no';
$conf['auth']['params']['driverconfig'] = 'custom';
$conf['auth']['driver'] = 'ldap';
$conf['group']['params']['hostspec'] = 'DC1.subdomain.ihs.ac.at 
DC2.subdomain.ihs.ac.at';
$conf['group']['params']['tls'] = false;
$conf['group']['params']['version'] = 3;
$conf['group']['params']['binddn'] = 'binduser';
$conf['group']['params']['bindpw'] = 'bindpassword';
$conf['group']['params']['bindas'] = 'admin';
$conf['group']['params']['basedn'] = 
'ou=ABC,ou=XYZ,dc=subdomain,dc=ihs,dc=ac,dc=at';
$conf['group']['params']['scope'] = 'sub';
$conf['group']['params']['gid'] = 'cn';
$conf['group']['params']['memberuid'] = 'memberUid';
$conf['group']['params']['attrisdn'] = false;
$conf['group']['params']['newgroup_objectclass'] = array('posixGroup', 
'hordeGroup');
$conf['group']['params']['search']['filter'] = 
'(&(&(objectclass=group)(objectclass=top)))';
$conf['group']['params']['search']['filter_type'] = 'filter';
$conf['group']['params']['driverconfig'] = 'custom';
$conf['group']['driver'] = 'ldap';
$conf['group']['cache'] = false;

2010-09-23 16:15:44 Jan Schneider Comment #6
State ⇒ Feedback
Reply to this comment
Please paste the *complete* ldap, auth, and group config settings.
2010-09-23 14:05:27 hutter (at) ihs (dot) ac (dot) at Comment #5 Reply to this comment
You didn't update your configuration.
I removed turba and nag conf.php and copied horde conf.php.dist to conf.php.
The I reconfigured all the staff in the horde configuration.

After selecting Generate Configuration I'm thrown out because I'm not 
an administrator (this is ok).
Logging in again I get an empty page again with the following error in 
the apache log:
PHP Catchable fatal error:  Argument 1 passed to 
Horde_Ldap_Filter::build() must be an array, null given, called in 
/srv/www/htdocs/github/horde/framework/Ldap/lib/Horde/Ldap.php on line 
864 and defined in 
/srv/www/htdocs/github/horde/framework/Ldap/lib/Horde/Ldap/Filter.php 
on line 274, referer: http://caltest2.ihs.ac.at/horde/login.php

My filter settings in the conf.php are:
$conf['auth']['params']['filter'] = 
'(&(&(objectclass=user)(!(objectclass=computer))))';
$conf['group']['params']['search']['filter'] = 
'(&(&(objectclass=group)(objectclass=top)))';
$conf['group']['params']['search']['filter_type'] = 'filter';

These settings worked before the git pull.
  Harald
2010-09-22 16:06:30 Jan Schneider Comment #4 Reply to this comment
You didn't update your configuration.
2010-09-22 15:00:45 hutter (at) ihs (dot) ac (dot) at Comment #3 Reply to this comment
Should be fixed with my latest commits to the auth ldap driver.
I'm not able to verify this, because after a git pull followd by 
install_dev today, I get the following error in the apache log:
  PHP Catchable fatal error:  Argument 1 passed to 
Horde_Ldap_Filter::build() must be an array, null given, called in 
/srv/www/htdocs/github/horde/framework/Ldap/lib/Horde/Ldap.php on line 
864 and defined in 
/srv/www/htdocs/github/horde/framework/Ldap/lib/Horde/Ldap/Filter.php 
on line 274, referer: http://myserver.domain/horde/login.php

In the browser I have only an empty page.

2010-09-20 17:02:27 Jan Schneider Comment #2
Assigned to Jan Schneider
State ⇒ Resolved
Reply to this comment
Should be fixed with my latest commits to the auth ldap driver.
2010-08-24 16:26:09 hutter (at) ihs (dot) ac (dot) at Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Summary ⇒ H4: Userlist empty (in admin gui)
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ Yes
New Attachment: Ldap.php.diff Download
Reply to this comment
Clicking on Users in the admin GUI (logged in as an administrator to
horde), we get only an empty list (icons are visible but no username is
shown).
I tracked this problem down in the code and it seems to be the following line
in function listUsers in framework/Auth/lib/Horde/Auth/Ldap.php
$uid = Horde_String::lower($this->_params['uid']);

See the attachment for a fix/workaround (diff -u output).

I assume the problem is, that a Ldap query is not case sensitive.
However, the result returned from our Windows 2008 Active Directory server
has the attribute sAMAccountName. By only converting the parameter uid
(which holds sAMAccountName) to lowercase, but not the returned result too,
the line "$userlist[] = $val[$uid][0];" will fail. If conversion to lowercase
is needed for other (real) ldap implementations, ensuring to convert the
returned attributes too, will be necessary for AD to work.

The disadvantage of the provided solution is one must enter 
sAMAccountName in the config, thus having a case sensitive 
configuration entry.

best,
Harald Hutter

Saved Queries