Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide Password when logging in #123

Open
p1ho opened this issue May 24, 2019 · 5 comments
Open

Hide Password when logging in #123

p1ho opened this issue May 24, 2019 · 5 comments

Comments

@p1ho
Copy link

p1ho commented May 24, 2019

Summary

When I logged in, the password is out in the open, it'd be nice if the password stays hidden.

Motivation

Security

@tomquirk
Copy link
Collaborator

Hi @p1ho , how do you mean "the password is out in the open"? As you enter the password, it should be hidden. Can you provide a screenshot?

@p1ho
Copy link
Author

p1ho commented May 25, 2019

Yes for sure. I'm running Git Bash on Windows 10 with Node v10.15.3 and npm 6.4.1

image

@tomquirk
Copy link
Collaborator

huh, thats really interesting! It is hidden on MacOS and Linux afaik. We're simply using this library. I'll look into it a bit more though

@p1ho
Copy link
Author

p1ho commented May 25, 2019

I see, I took a look at open issues and there were a couple that could be related:

@p1ho
Copy link
Author

p1ho commented May 25, 2019

@tomquirk
So I found the relevant code in the code base and tried to test it in isolation. Interestingly it works again...
This was the test code, the only dependency was prompt

const prompt = require('prompt');

var x = new Promise((resolve, reject) => {
  prompt.get(
      [
        {
          name: "email",
          required: true,
        },
        {
          name: "password",
          required: true,
          hidden: true,
        },
      ],
      (err, result) => {
        if (err) return reject(err);
        return resolve(result);
      },
    );
  }).then(result => {
    console.log(result);
  });

and this was the output
image

It's also not a version issue, because prompt should still be at version 1.0.0
I wonder if there are other places in the code base that could have messed with it...

UPDATE:
Tried a few things:

  • Tried running messer in Powershell, the password hides correctly.
  • Went into the directory installed by npm i -g messer and ran node index.js locally, the password is hidden correctly.
  • Downloaded a zip of the master branch:
    • using node index.js, the password is hidden correctly.
    • uninstalled messer globally, ran npm link, then ran messer. The password shows up.

I don't know how this could make a difference, but the problem seems to have stemmed from the command aliasing by npm.

@p1ho p1ho changed the title Hide Password when loging in Hide Password when logging in May 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants