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.

Full log


View this message in rfc822 format

From: "John Wiegley" <johnw <at> gnu.org>
To: 29665 <at> debbugs.gnu.org
Subject: bug#29665: 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




This bug report was last modified 4 years and 338 days ago.

Previous Next


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