all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: 8427@debbugs.gnu.org, Andrew Hyatt <ahyatt@gmail.com>
Cc: Michael Mauger <michael@mauger.com>
Subject: bug#8427: [SECURITY] sql.el -- comint process passwords are leaked to ps(1) listing
Date: Sun, 20 Oct 2019 18:02:40 +0200	[thread overview]
Message-ID: <CADwFkmnfL7FoJagWFReoTc2T=0ghxGcre3qXkjYcaUpHk1YouQ@mail.gmail.com> (raw)
In-Reply-To: <CADwFkm=pvfJ-GmmLxKt83i+rufpn9eJxnRBNnedOOKn2ENDQUA@mail.gmail.com>

(Please keep the bug address in Cc.)

Andrew Hyatt <ahyatt@gmail.com> writes:

> I'm attaching the fix.  The fix for MySQL was fairly straightforward.  I
> tried it out, and it works.

I'm not sure this is the right fix.  How is the user to know that the
correct thing is to provide an empty password when prompted for it?
Why do we even prompt for the password then?

Also, what if a user wants to login to an account that has no
password?  Should we really pass the "--password" parameter in that
case?  Does that work?

I think something like this would be better:

1. Keep the password prompt.
2. Use the naked "--password" parameter only when the user *has*
entered a password, and use nothing when the user entered nothing.
3. Never use the "--password=<foo>" parameter.
4. When mysql prompts for the password, send it to the process
automatically, without user interaction.

> I looked through sql.el for similar issues,
> and was able to fix Vertica as well, although I've never heard of
> Vertica before and couldn't test it out.  Parameters were set according
> to the docs at
> https://www.vertica.com/docs/9.2.x/HTML/Content/Authoring/ConnectingToVertica/vsql/CommandLineOptions.htm,
> which does match the existing code.

Unless someone can test it, perhaps we should leave out the Vertica part?

Thanks for working on this.

Best regards,
Stefan Kangas





  reply	other threads:[~2019-10-20 16:02 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-05 11:27 bug#8427: [SECURITY] sql.el -- comint process passwords are leaked to ps(1) listing Jari Aalto
2012-02-28 23:35 ` bug#8427: (no subject) Michael Mauger
2014-03-06  2:06 ` bug#8427: [SECURITY] sql.el -- comint process passwords are leaked to ps(1) listing Glenn Morris
2014-03-07 23:02   ` Stefan Monnier
2018-01-07 17:54     ` Andrew Hyatt
2019-10-06  3:28 ` Stefan Kangas
2019-10-13  1:51   ` Andrew Hyatt
2019-10-13 22:09     ` Stefan Kangas
     [not found]       ` <meny2xh8p4o.fsf@ahyatt-macbookpro6.roam.corp.google.com>
2019-10-20 15:57         ` bug#8427: Fwd: " Stefan Kangas
2019-10-20 16:02           ` Stefan Kangas [this message]
2019-10-21  0:56             ` Andrew Hyatt
2019-10-21 20:33               ` Michael Mauger via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-11-02  1:10                 ` Andrew Hyatt
2019-11-02 19:41                   ` Michael Mauger via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-11-11  5:31                     ` Andrew Hyatt
2019-12-16  4:59                       ` Andrew Hyatt
2019-12-16 15:12                         ` Michael Mauger via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-12-18  6:15                           ` Andrew Hyatt
2019-12-18 12:45                             ` Michael Mauger via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-12-18 16:57                               ` Eli Zaretskii
2019-12-18 17:52                                 ` Michael Mauger via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-12-30 15:11                                   ` Andrew Hyatt
2019-12-30 18:34                                     ` Michael Albinus
2019-12-30 19:26                                       ` Andrew Hyatt
2019-12-30 19:39                                         ` Eli Zaretskii
2019-12-30 23:36                                           ` Michael Mauger via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-21 12:45                                             ` Lars Ingebrigtsen
2021-10-12  5:05                                               ` Stefan Kangas
2021-10-13 16:05                                                 ` Michael Mauger via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-13 17:47                                                   ` Stefan Kangas
2021-10-13 18:26                                                     ` Eli Zaretskii
2021-10-13 21:26                                                       ` Stefan Kangas
2021-10-19  4:37                                                         ` Michael Mauger via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-10-19 11:58                                                           ` Eli Zaretskii
2021-10-19 12:05                                                             ` Michael Albinus
2021-11-05  7:11                                                           ` Stefan Kangas

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

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

  git send-email \
    --in-reply-to='CADwFkmnfL7FoJagWFReoTc2T=0ghxGcre3qXkjYcaUpHk1YouQ@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=8427@debbugs.gnu.org \
    --cc=ahyatt@gmail.com \
    --cc=michael@mauger.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.