GNU bug report logs - #51666
28.0.60; comint-password-prompt-regexp too restrictive (again)

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Sun, 7 Nov 2021 16:33:01 UTC

Severity: normal

Found in version 28.0.60

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: 51666 <at> debbugs.gnu.org
Subject: bug#51666: 28.0.60; comint-password-prompt-regexp too restrictive (again)
Date: Sun, 07 Nov 2021 21:33:33 +0100
Stephen Berman <stephen.berman <at> gmx.net> writes:

> On one of my systems, when using ssh in shell-mode (M-x shell), the
> password prompt does not appear in the minibuffer but only in the
> *shell* buffer directly under the ssh invocation, and the password is
> not hidden when it's entered.  The password prompt has this form:
>
> (user <at> host) Password:
>
> and comint-password-prompt-regexp fails to match it.  By contrast,
> eshell-password-prompt-regexp does match this prompt.  This is with
> openssh-8.6p1.  The fix in bug#43003 doesn't help here.

The following patch should fix the problem, but I'm a bit wary about
pushing it to Emacs 28, since these things may have unintended side
effects.

So I've pushed it to Emacs 29 instead.

diff --git a/lisp/comint.el b/lisp/comint.el
index c114bdf758..94e8e3b84b 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -385,7 +385,9 @@ comint-password-prompt-regexp
    "\\(?: [[:alpha:]]+ .+\\)?[[:blank:]]*[::៖][[:space:]]*\\'"
    ;; The ccrypt encryption dialogue doesn't end with a colon, so
    ;; treat it specially.
-   "\\|^Enter encryption key: (repeat) *\\'")
+   "\\|^Enter encryption key: (repeat) *\\'"
+   ;; openssh-8.6p1 format: "(user <at> host) Password:".
+   "\\|^([^)@ \t\n]+@[^)@ \t\n]+) Password: *\\'")
   "Regexp matching prompts for passwords in the inferior process.
 This is used by `comint-watch-for-password-prompt'."
   :version "28.1"


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 255 days ago.

Previous Next


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