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


Message #50 received at 64089 <at> debbugs.gnu.org (full text, mbox):

From: Jens Schmidt <jschmidt4gnu <at> vodafonemail.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 64089 <at> debbugs.gnu.org, fgunbin <at> fastmail.fm, monnier <at> iro.umontreal.ca
Subject: Re: bug#64089: 30.0.50; `ldap-search' errors out with
 `wrong-type-argument listp' when called WITHDN == t
Date: Sun, 18 Jun 2023 13:04:02 +0200
[Message part 1 (text/plain, inline)]
On 2023-06-18  10:56, Eli Zaretskii wrote:

> I'm uncomfortable with non-trivial changes, so if this is anywhere 
> like Filipp's proposal, I'd rather leave it unfixed on emacs-29.

So here are patch

  0001-Undo-suboptimal-fix-for-dn-line-parsing.patch

to back out my initial fix, plus *alternative* patches

  0002-filipp-Do-not-process-dn-entry-with-ldap-decode-attribute.patch

  0002-jschmidt-Do-not-process-dn-entry-with-ldap-decode-attribute.patch

Both fix this issue while keeping complete API stability.  Filipps is a
bit shorter, but IMHO harder to read plus slightly less efficient on
runtime, mine is a bit longer since it (partially) duplicates code.

Both give the same results, in particular independently of the setting
of `ldap-ignore-attribute-codings':

  (ldap-search "(uid=jeschmid)"
               "ldap://ldap.company.com"
               '("mail"))
  => ((("mail" "jens.schmidt <at> company.com")))

  (let ((ldap-ignore-attribute-codings t))
    (ldap-search "(uid=jeschmid)"
                 "ldap://ldap.company.com"
                 '("mail")
                 nil
                 t)
  => (("dn: cn=JENS_SCHMIDT,L=REGION,DC=COMPANY,DC=COM"
       ("mail" "jens.schmidt <at> company.com")))

  (let ((ldap-ignore-attribute-codings nil))
    (ldap-search "(uid=jeschmid)"
                 "ldap://ldap.company.com"
                 '("mail")
                 nil
                 t)
  => (("dn: cn=JENS_SCHMIDT,L=REGION,DC=COMPANY,DC=COM"
       ("mail" "jens.schmidt <at> company.com")))

Feel free to apply whatever you think appropriate.  Please on *emacs-29
only* (I haven't found how to mark that).  Then please close this bug.

Thanks
[0001-Undo-suboptimal-fix-for-dn-line-parsing.patch (text/x-patch, attachment)]
[0002-filipp-Do-not-process-dn-entry-with-ldap-decode-attribute.patch (text/x-patch, attachment)]
[0002-jschmidt-Do-not-process-dn-entry-with-ldap-decode-attribute.patch (text/x-patch, attachment)]

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.