From 128e243175763606c73cb23beea0b0b25739ce2d Mon Sep 17 00:00:00 2001 From: Fabrice Bauzac Date: Fri, 13 Jan 2023 15:44:35 +0100 Subject: [PATCH] Don't add a wildcard to LDAP query items lisp/net/eudcb-ldap.el (eudc-ldap-format-query-as-rfc1558): don't add an arbitrary wildcard to the last query item. --- lisp/net/eudcb-ldap.el | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/lisp/net/eudcb-ldap.el b/lisp/net/eudcb-ldap.el index b1733e99f5c..f39df13c391 100644 --- a/lisp/net/eudcb-ldap.el +++ b/lisp/net/eudcb-ldap.el @@ -174,21 +174,13 @@ eudc-ldap-escape-query-special-chars (defun eudc-ldap-format-query-as-rfc1558 (query) "Format the EUDC QUERY list as a RFC1558 LDAP search filter." - (let ((formatter - (lambda (item &optional wildcard) - (format "(%s=%s)" - (car item) - (concat - (eudc-ldap-escape-query-special-chars - (cdr item)) - (if (and wildcard - (not (memq (car item) - eudc-ldap-no-wildcard-attributes))) - "*" "")))))) - (format "(&%s)" - (concat - (mapconcat formatter (butlast query) "") - (funcall formatter (car (last query)) t))))) + (let ((formatter (lambda (item) + (format "(%s=%s)" + (car item) + (concat + (eudc-ldap-escape-query-special-chars + (cdr item))))))) + (format "(&%s)" (mapconcat formatter query "")))) ;;}}} -- 2.25.1