Something went wrong while setting issue due date.
Undefined index: dn / del_lock()
Closed
Undefined index: dn / del_lock()
I got the following (with debug enabled) error when deleting an user in FD 1.0.16-2~jenkinsbuild446
PHP error "Undefined index: dn" - File: /usr/share/fusiondirectory/include/functions.inc (Line 745) Trace[1]: function del_lock File: /usr/share/fusiondirectory/include/class_management.inc (Line 877) Type: - Arguments: "uid=..." Trace[2]: class management / function remove_lock File: /usr/share/fusiondirectory/include/simpleplugin/class_simpleManagement.inc (Line 724) Type: method Arguments: - Trace[3]: class simpleManagement / function removeEntryConfirmed File: /usr/share/fusiondirectory/include/class_management.inc (Line 455) Type: method Arguments: "removeConfirmed",array(),array("removeConfirmed",array()) Trace[4]: class management / function handleActions File: /usr/share/fusiondirectory/include/class_management.inc (Line 172) Type: method Arguments: array("removeConfirmed") Trace[5]: class management / function execute File: /usr/share/fusiondirectory/plugins/admin/users/main.inc (Line 47) Type: method Arguments: - Trace[6]: function require File: /usr/share/fusiondirectory/html/main.php (Line 286) Type: - Arguments: "/usr/share/fusiondirectory/plugins/admin/users/main.inc"
There might be a missing test in functions.inc / del_lock()
/* Check for existance and remove the entry */ $ldap = $config->get_ldap_link(); $ldap->cd(get_ou('lockRDN').get_ou('fusiondirectoryRDN').$config->current['BASE']); $ldap->search('(&(objectClass=fdLockEntry)(fdObjectDn='.base64_encode($object).'))', array('fdObjectDn')); $attrs = $ldap->fetch(); if (!$ldap->success()) { msg_dialog::display(_('LDAP error'), msgPool::ldaperror($ldap->get_error(), $ldap->getDN(), LDAP_DEL, ERROR_DIALOG)); return; } elseif ($attrs['dn'] != '') { $ldap->rmdir($attrs['dn']); } }
(is the case above, the 'dn' key in $attrs doesn't exist.)
(from redmine: issue id 5195, created on 2016-10-21, closed on 2016-10-24)
- Changesets:
- Revision 7dfa646a by Côme Chilliet on 2016-10-24T07:48:43.000Z:
Fixes #5195 Undefined index: dn / del_lock()
- Revision 160acc95 by Côme Chilliet on 2016-10-24T07:49:17.000Z:
Fixes #5195 Undefined index: dn / del_lock()