Commit 6a3a3b0e authored by Thomas Fitzsimmons's avatar Thomas Fitzsimmons

Downcase field names in LDAP results

* net/eudcb-ldap.el (eudc-ldap-cleanup-record-simple): Downcase
field names of LDAP results.
(eudc-ldap-cleanup-record-filtering-addresses): Likewise.
parent ea0ea900
2014-11-13 Thomas Fitzsimmons <fitzsim@fitzsim.org>
* net/eudcb-ldap.el (eudc-ldap-cleanup-record-simple): Downcase
field names of LDAP results.
(eudc-ldap-cleanup-record-filtering-addresses): Likewise.
2014-11-13 Thomas Fitzsimmons <fitzsim@fitzsim.org>
* net/ldap.el (ldap-ldapsearch-password-prompt): New defcustom.
......
......@@ -79,7 +79,11 @@
(mapcar
(function
(lambda (field)
(cons (intern (car field))
;; Some servers return case-sensitive names (e.g. givenName
;; instead of givenname); downcase the field's name so that it
;; can be matched against
;; eudc-ldap-attributes-translation-alist.
(cons (intern (downcase (car field)))
(if (cdr (cdr field))
(cdr field)
(car (cdr field))))))
......@@ -95,7 +99,7 @@
(mapcar
(function
(lambda (field)
(let ((name (intern (car field)))
(let ((name (intern (downcase (car field))))
(value (cdr field)))
(if (memq name '(postaladdress registeredaddress))
(setq value (mapcar 'eudc-filter-$ value)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment