GNU bug report logs - #29665
26.0.90; auth-source-pass decrypts entries 3 times on query

Previous Next

Package: emacs;

Reported by: "John Wiegley" <johnw <at> gnu.org>

Date: Mon, 11 Dec 2017 20:25:01 UTC

Severity: normal

Found in version 26.0.90

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29665 in the body.
You can then email your comments to 29665 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#29665; Package emacs. (Mon, 11 Dec 2017 20:25:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "John Wiegley" <johnw <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 11 Dec 2017 20:25:02 GMT) Full text and rfc822 format available.

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

From: "John Wiegley" <johnw <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.90; auth-source-pass decrypts entries 3 times on query
Date: Mon, 11 Dec 2017 12:23:48 -0800
I've enabled auth-source-pass on my system as follows:

  (use-package auth-source-pass
    :config
    (auth-source-pass-enable)
  
    (defun auth-source-pass--read-entry (entry)
      "Return a string with the file content of ENTRY."
      (with-temp-buffer
        (insert-file-contents (expand-file-name
                               (format "%s.gpg" entry)
                               (getenv "PASSWORD_STORE_DIR")))
        (buffer-substring-no-properties (point-min) (point-max))))
  
    (defun auth-source-pass-entries ()
      "Return a list of all password store entries."
      (let ((store-dir (getenv "PASSWORD_STORE_DIR")))
        (mapcar
         (lambda (file) (file-name-sans-extension (file-relative-name file store-dir)))
         (directory-files-recursively store-dir "\.gpg$")))))

This works around the other bug I logged today. I have one file in my store:

  ~/doc/.passwords/reddit.com

It has a "login: jwiegley" field. I then run:

  (auth-source-search :host "reddit.com" :user "jwiegley")

After doing so, I can see it Decrypting the reddit.com.gpg file three times
before it shows me the data, even with `auth-source-do-cache' set to t.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29665; Package emacs. (Sun, 14 Jul 2019 18:20:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 29665 <at> debbugs.gnu.org
Cc: John Wiegley <johnw <at> gnu.org>
Subject: Re: bug#29665: 26.0.90; auth-source-pass decrypts entries 3 times
 on query
Date: Sun, 14 Jul 2019 20:19:04 +0200
"John Wiegley" <johnw <at> gnu.org> writes:

> I've enabled auth-source-pass on my system as follows:
>
>   (use-package auth-source-pass
>     :config
>     (auth-source-pass-enable)
>   
>     (defun auth-source-pass--read-entry (entry)
>       "Return a string with the file content of ENTRY."
>       (with-temp-buffer
>         (insert-file-contents (expand-file-name
>                                (format "%s.gpg" entry)
>                                (getenv "PASSWORD_STORE_DIR")))
>         (buffer-substring-no-properties (point-min) (point-max))))
>   
>     (defun auth-source-pass-entries ()
>       "Return a list of all password store entries."
>       (let ((store-dir (getenv "PASSWORD_STORE_DIR")))
>         (mapcar
>          (lambda (file) (file-name-sans-extension (file-relative-name file store-dir)))
>          (directory-files-recursively store-dir "\.gpg$")))))
>
> This works around the other bug I logged today. I have one file in my store:
>
>   ~/doc/.passwords/reddit.com
>
> It has a "login: jwiegley" field. I then run:
>
>   (auth-source-search :host "reddit.com" :user "jwiegley")
>
> After doing so, I can see it Decrypting the reddit.com.gpg file three times
> before it shows me the data, even with `auth-source-do-cache' set to t.

The test case is a bit complicated, but I instrumented the normal
~/.authinfo reading, and it seemed to me that it would only read the
file once when I do the auth-source-search.

Does this work better for you too now?

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29665; Package emacs. (Wed, 12 Aug 2020 03:13:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: John Wiegley <johnw <at> gnu.org>, 29665 <at> debbugs.gnu.org
Subject: Re: bug#29665: 26.0.90;
 auth-source-pass decrypts entries 3 times on query
Date: Tue, 11 Aug 2020 20:12:48 -0700
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> "John Wiegley" <johnw <at> gnu.org> writes:
>
>> I've enabled auth-source-pass on my system as follows:
>>
>>   (use-package auth-source-pass
>>     :config
>>     (auth-source-pass-enable)
>>
>>     (defun auth-source-pass--read-entry (entry)
>>       "Return a string with the file content of ENTRY."
>>       (with-temp-buffer
>>         (insert-file-contents (expand-file-name
>>                                (format "%s.gpg" entry)
>>                                (getenv "PASSWORD_STORE_DIR")))
>>         (buffer-substring-no-properties (point-min) (point-max))))
>>
>>     (defun auth-source-pass-entries ()
>>       "Return a list of all password store entries."
>>       (let ((store-dir (getenv "PASSWORD_STORE_DIR")))
>>         (mapcar
>>          (lambda (file) (file-name-sans-extension (file-relative-name file store-dir)))
>>          (directory-files-recursively store-dir "\.gpg$")))))
>>
>> This works around the other bug I logged today. I have one file in my store:
>>
>>   ~/doc/.passwords/reddit.com
>>
>> It has a "login: jwiegley" field. I then run:
>>
>>   (auth-source-search :host "reddit.com" :user "jwiegley")
>>
>> After doing so, I can see it Decrypting the reddit.com.gpg file three times
>> before it shows me the data, even with `auth-source-do-cache' set to t.
>
> The test case is a bit complicated, but I instrumented the normal
> ~/.authinfo reading, and it seemed to me that it would only read the
> file once when I do the auth-source-search.
>
> Does this work better for you too now?

No reply here within 12 months.

Yesterday, I accidentally replied individually to Lars only, asking if
there is more to do here or if this should be closed.  He replied saying
that it should probably be closed.

Does anyone else have an opinion here?  Otherwise, I'll just go ahead
and close this.

Best regards,
Stefan Kangas




Reply sent to Stefan Kangas <stefan <at> marxist.se>:
You have taken responsibility. (Tue, 18 Aug 2020 13:27:01 GMT) Full text and rfc822 format available.

Notification sent to "John Wiegley" <johnw <at> gnu.org>:
bug acknowledged by developer. (Tue, 18 Aug 2020 13:27:01 GMT) Full text and rfc822 format available.

Message #16 received at 29665-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 29665-done <at> debbugs.gnu.org, John Wiegley <johnw <at> gnu.org>
Subject: Re: bug#29665: 26.0.90;
 auth-source-pass decrypts entries 3 times on query
Date: Tue, 18 Aug 2020 13:26:48 +0000
Stefan Kangas <stefan <at> marxist.se> writes:

> No reply here within 12 months.
>
> Yesterday, I accidentally replied individually to Lars only, asking if
> there is more to do here or if this should be closed.  He replied saying
> that it should probably be closed.
>
> Does anyone else have an opinion here?  Otherwise, I'll just go ahead
> and close this.

No further reply within a week, so I'm closing this now.

Best regards,
Stefan Kangas




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 16 Sep 2020 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 223 days ago.

Previous Next


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