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 13:04:02 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0


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@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@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@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

Attachment: 0001-Undo-suboptimal-fix-for-dn-line-parsing.patch
Description: Text Data

Attachment: 0002-filipp-Do-not-process-dn-entry-with-ldap-decode-attribute.patch
Description: Text Data

Attachment: 0002-jschmidt-Do-not-process-dn-entry-with-ldap-decode-attribute.patch
Description: Text Data


reply via email to

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