GNU bug report logs - #38284
27.0.50; [PATCH] Make auth-source-pass-search understand port lists

Previous Next

Package: emacs;

Reported by: João Távora <joaotavora <at> gmail.com>

Date: Wed, 20 Nov 2019 00:22:05 UTC

Severity: normal

Tags: patch

Found in version 27.0.50

Fixed in version 27.1

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: João Távora <joaotavora <at> gmail.com>
Cc: Damien Cassou <damien <at> cassou.me>, 38284 <at> debbugs.gnu.org, Nicolas Petton <nicolas <at> petton.fr>
Subject: bug#38284: 27.0.50; [PATCH] Make auth-source-pass-search understand port lists
Date: Thu, 21 Nov 2019 14:47:54 +0100
João Távora <joaotavora <at> gmail.com> writes:

> This modification makes this library understand and unroll the port
> list so that, i.e. "domain:993", "domain:imaps"", "domain:imap",
> etc. are computed as potential suffixes.  Previously a nonsensical
> string "domain:(993 imaps imap ...)" was return.
>
>    (let ((domains (auth-source-pass--domains (split-string hostname "\\."))))
> -    (seq-mapcat (lambda (n)
> -                  (auth-source-pass--name-port-user-suffixes n user port))
> +    (seq-mapcat (lambda (d)
> +                  (seq-mapcat
> +                   (lambda (p)
> +                     (auth-source-pass--name-port-user-suffixes d user p))
> +                   (if (listp port) port (list port))))
>                  domains)))

Looks good to me, but I don't use password-store so I can't really
test.  If it works for you, please go ahead and apply.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 5 years and 117 days ago.

Previous Next


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