GNU bug report logs - #64089
30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t

Previous Next

Package: emacs;

Reported by: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>

Date: Thu, 15 Jun 2023 21:29:02 UTC

Severity: normal

Fixed in version 30.0.50

Done: Filipp Gunbin <fgunbin <at> fastmail.fm>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
To: 64089 <at> debbugs.gnu.org
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
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.




This bug report was last modified 2 years and 28 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.