question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No way to mask default for password type prompts

See original GitHub issue

Following the documented example

@click.option('--password', prompt=True, hide_input=True,
              confirmation_prompt=True, default='MySecretIsOut')

while adding a default demonstrates the issue. It just displays sensitive data in plaintext, maybe it could mask most of the letters or something like that.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
sh4nkscommented, Nov 8, 2019

If you already have a secret you could just check if the password input is empty, and if it is, use the pre-generated secret key.

0reactions
jivemancommented, Nov 22, 2019

I ended up masking it before supplying to default, then unmasking when using it on the other side. It was quick and easy, just thought other’s might like this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Masking input characters without type=password
Load the form with the password field with type="text" , so browsers' autocompletion algorithms will ignore it. When the user inputs something in...
Read more >
Stop Password Masking - Nielsen Norman Group
Most websites (and many other applications) mask passwords as users type them, and thereby theoretically prevent miscreants from looking over ...
Read more >
Password default should be masked · Issue #270 - GitHub
I believe you can implement to logic to mask the previous password in your own code. The default value is used as is...
Read more >
<input type="password"> - HTML: HyperText Markup Language
<input> elements of type password provide a way for the user to securely enter a password. The element is presented as a one-line...
Read more >
How to mask input character | Adobe Acrobat
Hi,. I have this password prompt box whenever user will open the file, how can I make the password shown as * when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found