Subject: bug#43003: 28.0.50; comint-password-prompt-regexp too restrictive

From: Lars Ingebrigtsen <[email-masked]>
Date: Tue, 01 Sep 2020 16:28:17 +0200

Robert Pluim <[email-masked]> writes:

> That matches the analysis done in
>
> https://emacs.stackexchange.com/questions/60394/unable-to-push-into-github-using-magit
>
> which leads to:
>
> https://github.com/magit/magit/issues/3843

Thanks for doing the detective work here.  Summary:

----
 After a bit of digging, the change does indeed come from OpenSSH:
 
 https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/readpass.c.diff?r1=1.52&r2=1.53 
  
  Print an \r in front of the password prompt so parts of a password
  that was     entered too early are likely clobbered by the prompt.
----

To which I can only say: "Ok...?"

> TL;DR magit decided to strip the \r from the prompt received from
> openssh.

[...]

> Perhaps just strip '\r'? (And document it, of course)

[...]

> -	  (string-match comint-password-prompt-regexp string))
> +	  (string-match comint-password-prompt-regexp
> +                        (replace-regexp-in-string "\r" "" string)))

Yes, that makes sense to me.

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