Commit d8157a11 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

Fix "password" detection in authinfo mode

* lisp/auth-source.el (authinfo--hide-passwords): Ensure that we
only hit actual "password" entries and not "foo-password" and the
parent 942665d6
Pipeline #3254 failed with stage
in 90 minutes and 3 seconds
......@@ -2416,9 +2416,9 @@ passwords are revealed when point moved into the password.
(narrow-to-region start end)
(goto-char start)
(while (re-search-forward "\\bpassword +\\([^\n\t ]+\\)"
(while (re-search-forward "\\(\\s-\\|^\\)password\\s-+\\([^\n\t ]+\\)"
nil t)
(let ((overlay (make-overlay (match-beginning 1) (match-end 1))))
(let ((overlay (make-overlay (match-beginning 2) (match-end 2))))
(overlay-put overlay 'display (propertize "****"
'face 'warning))
(overlay-put overlay 'reveal-toggle-invisible
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment