mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 14:30:50 -08:00
Improve robustness of auth-source-pass.el
* lisp/auth-source-pass.el (auth-source-pass--read-entry): Ensure, that `epa-file-handler' is active. (Bug#67937)
This commit is contained in:
parent
1c2e0615fb
commit
1b33c00f4c
1 changed files with 9 additions and 4 deletions
|
|
@ -195,10 +195,15 @@ See `auth-source-pass-get'."
|
||||||
(defun auth-source-pass--read-entry (entry)
|
(defun auth-source-pass--read-entry (entry)
|
||||||
"Return a string with the file content of ENTRY."
|
"Return a string with the file content of ENTRY."
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
|
;; `file-name-handler-alist' could be nil, or miss the
|
||||||
|
;; `epa-file-handler' entry. We ensure, that it does exist.
|
||||||
|
;; (Bug#67937)
|
||||||
|
(let ((file-name-handler-alist
|
||||||
|
(cons epa-file-handler file-name-handler-alist)))
|
||||||
(insert-file-contents (expand-file-name
|
(insert-file-contents (expand-file-name
|
||||||
(format "%s.gpg" entry)
|
(format "%s.gpg" entry)
|
||||||
auth-source-pass-filename))
|
auth-source-pass-filename))
|
||||||
(buffer-substring-no-properties (point-min) (point-max))))
|
(buffer-substring-no-properties (point-min) (point-max)))))
|
||||||
|
|
||||||
(defun auth-source-pass-parse-entry (entry)
|
(defun auth-source-pass-parse-entry (entry)
|
||||||
"Return an alist of the data associated with ENTRY.
|
"Return an alist of the data associated with ENTRY.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue