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

Support reading PWS passwords from stdin #163

Closed
wants to merge 5 commits into from

Conversation

robinkrahl
Copy link
Collaborator

Specifying passwords as command-line arguments can be problematic: The
user has to be careful that the command is not recorded in the shell
history. Also, the password might be exposed over the process list.

This patch adds an alternative input method for the pws add and pws
update methods: reading the password from stdin. This is activated by
setting the password to "-". For the tests, we use a string as a
simulated stdin buffer.


This patch is part of the PWS interface refactoring discussed in #139 and is based on #162.

This patch removes the pws set subcommand as part of the PWS interface
refactoring.  Users should use pws add (for writing to new slots) or pws
update (for writing to existing slots) instead.  This makes it less
likely to accidentally overwrite PWS data.
This reverts commit ba2311e.  The
previous patch removed the code that caused problems with the MSRV
(u8::MIN and u8::MAX), so we no longer have to increase it.
Specifying passwords as command-line arguments can be problematic:  The
user has to be careful that the command is not recorded in the shell
history.  Also, the password might be exposed over the process list.

This patch adds an alternative input method for the pws add and pws
update methods: reading the password from stdin.  This is activated by
setting the password to "-".  For the tests, we use a string as a
simulated stdin buffer.
@robinkrahl robinkrahl mentioned this pull request Apr 20, 2021
5 tasks
@d-e-s-o
Copy link
Owner

d-e-s-o commented Apr 21, 2021

Very nice change. Thanks Robin! Merged.

@d-e-s-o d-e-s-o closed this Apr 21, 2021
@robinkrahl robinkrahl deleted the pws-password-stdin branch April 21, 2021 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants