bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument l


From: Jens Schmidt
Subject: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t
Date: Thu, 15 Jun 2023 23:28:33 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

Start emacs -Q.  Then:

(require 'ldap)
=> ldap

(setq ldap-host-parameters-alist
      '(("ldap://<host>" .
         (auth simple
          base "dc=<domain>,dc=com"))))
=> (("ldap://<host>" auth simple base "dc=<domain>,dc=com"))

(ldap-search "(uid=<uid>)"
             "ldap://<host>"
             '("mail"))
=> ((("mail" "<name>@<domain>.com")))

(ldap-search "(uid=<uid>)"
             "ldap://<host>"
             '("mail")
             nil
             t)

Error stack:
Debugger entered--Lisp error: (wrong-type-argument listp "dn: cn=<NAME>,L=<REGION>,DC=<DOMAIN>,DC=COM")
  ldap-decode-attribute("dn: cn=<NAME>,L=<REGION>,DC=<DOMAIN>,DC=COM")
mapcar(ldap-decode-attribute ("dn: cn=<NAME>,L=<REGION>,DC=<DOMAIN>,DC=COM" ("mail" "<name>@<domain>.com")))

Error cause is pretty obvious: Function `ldap-decode-attribute' expects a pair ("dn" "<dn>") and not a string "dn: <dn>" generated by the sexp

  `(setq dn (buffer-substring (point) (line-end-position)))'

in `ldap-search-internal'.

This bug is also present in Emacs 29.

Patch available, will provide in next bug update.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]