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 #23 received at 64089 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Filipp Gunbin <fgunbin <at> fastmail.fm>
Cc: 64089 <at> debbugs.gnu.org, jschmidt4gnu <at> vodafonemail.de,
 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: Sat, 17 Jun 2023 09:03:25 +0300
> From: Filipp Gunbin <fgunbin <at> fastmail.fm>
> Cc: 64089 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>, Eli
>  Zaretskii <eliz <at> gnu.org>
> Date: Sat, 17 Jun 2023 01:13:33 +0300
> 
> > I tried to make the patch as conservative as possible and
> > intentionally do not check syntax of the dn line if its parsing is not
> > required.
> 
> I think I have better patch here.  This is what it addresses:
> 
> 1) The bug you reported.  My patch tries to keep the API intact (we
> don't want breakage, however I think not much people actually use withdn
> arg): return dn as a string, prepended to attribute alist.
> 
> 2) dn is now parsed just like the other attributes, with the same
> regexp.
> 
> 3) (unrelated, just noticed and fixed) Match data clobbering in this
> piece:
> 
> -            ;; Need to handle file:///D:/... as generated by OpenLDAP
> -            ;; on DOS/Windows as local files.
> -            (if (and (memq system-type '(windows-nt ms-dos))
> -                     (eq (string-match "/\\(.:.*\\)$" value) 0))
> -                (setq value (match-string 1 value)))
> 
> 4) This code:
> 
> +          (when dn
> +	    (cond (withdn 
> +		   (push (cons dn (nreverse record))
> +                         result))
> 
> intentionally doesn't check whether record is non-nil:  potentially we
> could request "no attributes" (there's an option for that in ldapsearch,
> however I don't think this is currently possible in ldap.el), and it's
> ok to return just dn.
> 
> Please give it a try, if it's OK and others have no objections, I'll
> install it on Monday (on master, I guess).

Yes, this is more complex change, so it is not appropriate for
emacs-29.

I think I will install Jens's patch on emacs-29 marking it not for
merging to master.




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.