unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Nicholas Drozd <nicholasdrozd@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 43302@debbugs.gnu.org
Subject: bug#43302: password shows up in shell buffer (27.1)
Date: Fri, 12 Feb 2021 14:50:01 -0600	[thread overview]
Message-ID: <CABAiW0oddk-h1_4yYERMm1hNhA2gYyjMVj5=i1JZsrD5Sybvjg@mail.gmail.com> (raw)
In-Reply-To: <87ft2maojs.fsf@gnus.org>

Your workaround works, but the fact remains that the behavior changed
between 26 and 27, and it changed in a way that I as a user found
disturbing. I switched to 27, and on my first session I ran a script
that queried for a password. Previously Emacs had hid the password as
I expected, but in 27 my password was unexpectedly exposed on the
screen. It's a bug, and it should be fixed. (I would try to fix it
myself, but I have no idea where to start. With a little guidance I
could take a crack at it.)

Alternatively, it could have been an intentional change in behavior.
In that case it should be noted in NEWS. Something like: "shell-mode:
Passwords are protected in fewer circumstances." But that sounds more
like antinews than news.

On Wed, Jan 27, 2021 at 12:20 AM Lars Ingebrigtsen <larsi@gnus.org> wrote:
>
> Nicholas Drozd <nicholasdrozd@gmail.com> writes:
>
> > In 27, it looks like this:
> >
> > #+begin_src
> > $ bash password.sh
> > Password:
> > asdf
> > $
> > #+end_src
> >
> > The password (=asdf=) gets input directly into the shell buffer, unstarred.
>
> I'm able to reproduce the behaviour in Emacs 27 and 28.  However, if you
> say this:
>
> echo -n "Password:"
> read -sr password
>
> Then Emacs will *** the password in the minibuffer, so comint only
> triggers the password-reading behaviour if there's no newline there.
>
> Now, Emacs 26 did handle this...  somewhat:
>
>
> That is, it would include the newline in the prompt.
>
> So...  I think basically this works as intended currently: comint only
> triggers the password-reading behaviour if the prompt is on the current
> line (i.e., without a newline), so I'm closing this bug report.
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2021-02-12 20:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10  0:40 bug#43302: password shows up in shell buffer (27.1) Nicholas Drozd
2020-09-10 12:26 ` Robert Pluim
2021-01-27  6:20 ` Lars Ingebrigtsen
2021-02-12 20:50   ` Nicholas Drozd [this message]
2021-02-13  7:23     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABAiW0oddk-h1_4yYERMm1hNhA2gYyjMVj5=i1JZsrD5Sybvjg@mail.gmail.com' \
    --to=nicholasdrozd@gmail.com \
    --cc=43302@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).