mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -08:00
Do not save empty passwords in auth-source-search
* lisp/auth-source.el (auth-source-netrc-create) (auth-source-secrets-create): Set :save-function only for non empty passwords. * lisp/net/tramp.el (tramp-read-passwd): Don't save empty passwords. * test/lisp/auth-source-tests.el (auth-source-test-secrets-create-secret): Adapt test. (auth-source-test-netrc-create-secret): New test.
This commit is contained in:
parent
7abbf3779c
commit
788a65862e
3 changed files with 131 additions and 51 deletions
|
|
@ -5677,6 +5677,10 @@ Invokes `password-read' if available, `read-passwd' else."
|
|||
;; Else, get the password interactively w/o cache.
|
||||
(read-passwd pw-prompt))
|
||||
|
||||
;; Workaround. Prior Emacs 28.1, auth-source has saved
|
||||
;; empty passwords. See discussion in Bug#50399.
|
||||
(when (zerop (length auth-passwd))
|
||||
(setq tramp-password-save-function nil))
|
||||
(tramp-set-connection-property v "first-password-request" nil)))
|
||||
|
||||
;; Reenable the timers.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue