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: Filipp Gunbin <fgunbin <at> fastmail.fm>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 64089 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: bug#64089: 30.0.50; `ldap-search' errors out with `wrong-type-argument listp' when called WITHDN == t
Date: Sun, 18 Jun 2023 10:51:25 +0200
On 2023-06-18  09:43, Jens Schmidt wrote:

> Or whatever.  In any case, I'll open a new bug for that to continue 
> this discussion.

And of course, Filipp is right w.r.t. to API consistency.  TBH, I simply
haven't payed attention to `ldap-ignore-attribute-codings' until
recently.  So for emacs-29, I can provide a patch that backs out my
previous patch and fixes the bug such that the *original/Gerd's* string

  "dn: cn=JENS_SCHMIDT,L=REGION,DC=COMPANY,DC=COM"

gets appended to the result w/o triggering the

  wrong-type-argument listp

for both `ldap-ignore-attribute-codings' equaling nil and non-nil.

Basicaly the upper half of Filipp's patch, but redone such that even I
understand it without too much eye-balling :-).  Like this probably (not
tested yet!):

    (cond
     (ldap-ignore-attribute-codings
      result)
     (withdn
      ;; Do not process first elements of the records
      ;; with `ldap-decode-attribute' (Bug#64089).
      (mapcar (lambda (record)
                (cons (car record)
		      (mapcar #'ldap-decode-attribute
                              (cdr record)))
	        result)))
     (t
      (mapcar (lambda (record)
		(mapcar #'ldap-decode-attribute record))
                result))))

WDYT?




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.