mirror of
https://github.com/restic/restic.git
synced 2025-08-12 16:27:40 +00:00
Fix reading password from stdin
Reading the password from non-terminal stdin used io.ReadFull with a byte slice of length 1000. We are now using a Scanner to read one line of input, independent of its length. Additionally, if stdin is not a terminal, the password is read only once instead of twice (in an effort to detect typos). Fixes #2203 Signed-off-by: Peter Schultz <peter.schultz@classmarkets.com>
This commit is contained in:
6
changelog/unreleased/issue-2203
Normal file
6
changelog/unreleased/issue-2203
Normal file
@@ -0,0 +1,6 @@
|
||||
Bugfix: Fix reading passwords from stdin
|
||||
|
||||
Passwords for the `init`, `key add`, and `key passwd` commands can now be read from
|
||||
non-terminal stdin.
|
||||
|
||||
https://github.com/restic/restic/issues/2203
|
Reference in New Issue
Block a user