GNU bug report logs - #20541
ERC password fetching using Secret Service API is broken

Previous Next

Package: emacs;

Reported by: Krzysztof Jurewicz <krzysztof.jurewicz <at> gmail.com>

Date: Sun, 10 May 2015 14:15:03 UTC

Severity: normal

Fixed in version 25.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Krzysztof Jurewicz <krzysztof.jurewicz <at> gmail.com>
Cc: Ted Zlatanov <tzz <at> lifelogs.com>, 20541 <at> debbugs.gnu.org
Subject: Re: bug#20541: ERC password fetching using Secret Service API is
 broken
Date: Mon, 01 Jun 2015 11:20:58 +0200
Krzysztof Jurewicz <krzysztof.jurewicz <at> gmail.com> writes:

> One possible patch is attached below. This is the simplest solution; I
> have not thought much about whether it may be more desirable to convert
> numbers to strings inside the secrets.el package.

Well, secrets.el expects only strings as attributes. No conversion
foreseen. I don't know what auth-source.el does. If auth-source-search
also allows only strings (and symbol names) as attributes, then your
patch is right. Otherwise, if a :port attribute could also be an
integer, it shall be transformed to a string.

Ted?

> From 25f798b3b86a34bd6b262c59c3733d72eec50c13 Mon Sep 17 00:00:00 2001
> From: Krzysztof Jurewicz <krzysztof.jurewicz <at> gmail.com>
> Date: Thu, 7 May 2015 13:01:24 +0200
> Subject: [PATCH] * lisp/erc/erc.el (erc-open): Fix password fetching
>
> ERC used to pass the port number as a number, however when using
> Secret Service API, only strings can be used.
>
> Copyright-paperwork-exempt: yes
> ---
>  lisp/erc/erc.el | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
> index cf422f1..a8f1478 100644
> --- a/lisp/erc/erc.el
> +++ b/lisp/erc/erc.el
> @@ -2010,7 +2010,8 @@ Returns the buffer for the given server or channel."
>                             (auth-source-search :host server
>                                                 :max 1
>                                                 :user nick
> -                                               :port port
> +                                               ;; secrets.el wouldn’t accept a number
> +                                               :port (if (numberp port) (number-to-string port) port)
>                                                 :require '(:secret)))
>                        :secret)))
>                  (if (functionp secret)
> --
> 2.4.0

Best regards, Michael.




This bug report was last modified 9 years and 153 days ago.

Previous Next


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