]> git.eshelyaron.com Git - emacs.git/commit
Prevent line-mode term from showing user passwords
authorTino Calancha <tino.calancha@gmail.com>
Thu, 15 Feb 2018 00:09:50 +0000 (09:09 +0900)
committerNoam Postavsky <npostavs@gmail.com>
Mon, 23 Jul 2018 12:20:07 +0000 (08:20 -0400)
commit2b70b54739a8a422aff85f0183fb69eb339c35d4
tree282c47615c71006d6173d4a6eb1043e43c0a9f9a
parent5de444112cf19c078d4a74752a50e890233ef033
Prevent line-mode term from showing user passwords

For buffers whose mode derive from comint-mode, the user password is
read from the minibuffer and it's hidden.  A buffer in term-mode and
line submode, instead shows the passwords.  Make buffers in line
term-mode to hide passwords too (Bug#30190).

* lisp/term.el (term-send-invisible): Prefer the more robust
`read-passwd' instead of `term-read-noecho'.
(term-watch-for-password-prompt): New function.
(term-emulate-terminal): Call it each time we receive non-escape
sequence output.

Co-authored-by: Noam Postavsky <npostavs@gmail.com>
lisp/term.el