Subject: bug#79424: 30.2; shell-mode doesn't hide password

From: Michael Albinus <[email-masked]>
Date: Wed, 10 Sep 2025 18:56:09 +0200

André A. Gomes <[email-masked]> writes:

> Hello,

Hi André,

> I'm using shell-mode to copy a file to a remote machine:
>
> scp /file/path host-name:/file/path
>
> The ssh connection requires inserting the password and I'd expect that
> shell-mode would replace each of the characters with a placeholder (like
> asterisks).  However, it exposes the password on the screen.

In shell-mode, it is tracked whether a password prompt appears. Then the
password is read with hidden characters in the minibuffer. Terchnically,
this is implemented by adding comint-watch-for-password-prompt to
comint-output-filter-functions. What is the value of that variable in
your shell buffer?

The check is performed using comint-password-prompt-regexp. What is the
value of that variable, and the password prompt, in your shell buffer?

> Thanks.

Best regards, Michael.