6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
11/27/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#7770] Ldap driver doesn't convert to lower case index attributes
*
Your Email Address
*
Spam protection
Enter the letters below:
. .._.. .. ..__ |\/| | |_/ |\/|[__) | |_|_| \| |[__)
Comment
> Hello, > > I use Sork Vacation with Ldap and my problem was that Sork Vacation > didn't get the vacation status and vacation message from ldap. The > ldap query was performed ok but the result comparison always was > false because vacationActive != vacationactive > > > > ldap_get_entries returns a complete result information in a > multi-dimensional array and the attribute index is converted to > lowercase (Attributes are case-insensitive for directory servers, but > not when used as array indices.) > > The problem is that ldap_get_attributes() doesn't have this behaveour > and attribute idexes are not converted to lower case. To convert to > lower case we can use the function array_change_key_case(). > > > > I see in the code in ldap.php on line 342 > > $messageAttr = String::lower($this->_params[$realm]['vacation']); > > and on line 347 > > $vacationAttr = String::lower($this->_params[$realm]['active']); > > So though in vacation3/conf.php i defined: > > $conf['server']['params']['default']['vacation'] = 'vacationInfo'; > > $conf['server']['params']['default']['active'] = 'vacationActive'; > > they get converted to lower case and the comparisons > > if (isset($retAttrs[$messageAttr])) > > and > > if (isset($retAttrs[$vacationAttr])) > > are always false because $retAttrs[$messageAttr] has the value > vacationInfo and $retAttrs[$vacationAttr] has the value > vacationActive. Those values have been obtained with > ldap_get_attributes and they were'n converted to lower case. > > > > The patch i did is below pasted, and for me at the moment is working > flawlessly: > > > > 332c332 > > < $retAttrs = ldap_get_attributes($this->_ds, $entry); > > --- > >> $retAttrs = >> array_change_key_case(ldap_get_attributes($this->_ds, $entry)); > >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers