GNU bug report logs - #31075
25.2; shell/eshell password prompt have not hide password input

Previous Next

Package: emacs;

Reported by: Rugang Chen <urugang <at> gmail.com>

Date: Fri, 6 Apr 2018 09:31:02 UTC

Severity: normal

Tags: fixed

Found in version 25.2

Fixed in version 27.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Rugang Chen <urugang <at> gmail.com>
To: 31075 <at> debbugs.gnu.org
Subject: bug#31075: 25.2; shell/eshell password prompt have not hide password input
Date: Fri, 6 Apr 2018 09:18:42 +0800
[Message part 1 (text/plain, inline)]
I found that command sudo has two pattern for english and chinese.
```
urugang <at> urugang-ubuntu:~$ LC_ALL=C sudo ls
[sudo] password for urugang:
urugang <at> urugang-ubuntu:~$ LC_ALL=zh_CN.utf8 sudo ls
[sudo] urugang 的密码:
```

So i think we should change comint-password-prompt-regexp from
```
(defcustom comint-password-prompt-regexp
  (concat
   "\\(^ *\\|"
   (regexp-opt
    '("Enter" "enter" "Enter same" "enter same" "Enter the" "enter the"
      "Old" "old" "New" "new" "'s" "login"
      "Kerberos" "CVS" "UNIX" " SMB" "LDAP" "[sudo]" "Repeat" "Bad") t)
   " +\\)"
   "\\(?:" (regexp-opt password-word-equivalents) "\\|Response\\)"
   "\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\| (again)\\)?\
\\(?: for [^::៖]+\\)?[::៖]\\s *\\'")
  "Regexp matching prompts for passwords in the inferior process.
This is used by `comint-watch-for-password-prompt'."
  :version "24.4"
  :type 'regexp
  :group 'comint)
```
to
```
(defcustom comint-password-prompt-regexp
  (concat
   "\\(^ *\\|"
   (regexp-opt
    '("Enter" "enter" "Enter same" "enter same" "Enter the" "enter the"
      "Old" "old" "New" "new" "'s" "login"
      "Kerberos" "CVS" "UNIX" " SMB" "LDAP" "[sudo]" "Repeat" "Bad") t)
   " +.*\\)"
   "\\(?:" (regexp-opt password-word-equivalents) "\\|Response\\)"
   "\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\| (again)\\)?\
\\(?: for [^::៖]+\\)?[::៖]\\s *\\'")
  "Regexp matching prompts for passwords in the inferior process.
This is used by `comint-watch-for-password-prompt'."
  :version "24.4"
  :type 'regexp
  :group 'comint)
```
In short, change `" +\\)"` to `" +.*\\)"`.

I have a question that why eshell dot not use same password prompt
patter in commit-mode.

```
(setq eshell-password-prompt-regexp comint-password-prompt-regexp)
```
[Message part 2 (text/html, inline)]

This bug report was last modified 6 years and 275 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.