GNU bug report logs - #62721
30.0.50; EUDC: stop adding a wildcard to LDAP searches

Previous Next

Package: emacs;

Reported by: Fabrice Bauzac-Stehly <libnoon <at> orange.fr>

Date: Sat, 8 Apr 2023 07:21:02 UTC

Severity: normal

Found in version 30.0.50

Done: Thomas Fitzsimmons <fitzsim <at> fitzsim.org>

Bug is archived. No further changes may be made.

Full log


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

From: Thomas Fitzsimmons <fitzsim <at> fitzsim.org>
To: Fabrice Bauzac-Stehly <libnoon <at> orange.fr>
Cc: 62721 <at> debbugs.gnu.org, Filipp Gunbin <fgunbin <at> fastmail.fm>
Subject: Re: bug#62721: 30.0.50; EUDC: stop adding a wildcard to LDAP searches
Date: Wed, 19 Apr 2023 08:48:54 -0400
Hi Fabrice,

Filipp Gunbin <fgunbin <at> fastmail.fm> writes:

> On 10/04/2023 21:09 +0200, Fabrice Bauzac-Stehly wrote:
>
>> Hello,
>>
>> Sorry, I have not put sufficient information in my initial message.  In
>> my case, I'm using eudc-query-form, where I know I can add wildcards to
>> the fields if I want.  My complaint is about the fact that a wildcard is
>> imposed on me in this case, with annoying consequences.  Thanks to your
>> message, I understand though that this automatic wildcard may be useful
>> in other contexts where `eudc-ldap-format-query-as-rfc1558' is called.
>>
>> Customizing `eudc-ldap-no-wildcard-attributes' would work in the sense
>> that I could disable the wildcards in all cases, but I suspect this
>> solution is not ideal as it would also disable it in the case of
>> eudc-expand-inline where (as I understand from your message) it would
>> actually be useful.
>>
>> I think that in the case of eudc-query-form, no wildcard should ever be
>> added.  What do you think?  Should we pass some parameter so that
>> eudc-ldap-format-query-as-rfc1558 knows what to do?
>>
>> Thanks!
>
> To me, it's always useful to have wildcard.
>
> Would this simple advice help in your case?  I tried it with mail,
> replace it with your attributes.
>
> (defun my/eudc-process-form (orig &rest args)
>   (let ((eudc-ldap-no-wildcard-attributes
> 	 (cons 'mail eudc-ldap-no-wildcard-attributes)))
>     (apply orig args)))
>
> (advice-add 'eudc-process-form :around #'my/eudc-process-form)

Did the advice that Filipp suggested work for you?

Maybe we could add a checkbox to eudc-query-form whether to tack on a
wildcard or not, defaulted to the value of
eudc-ldap-no-wildcard-attributes.

Thomas




This bug report was last modified 2 years and 8 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.