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: Sun, 18 Jun 2023 10:51:25 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0

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?





reply via email to

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