mirror of
https://github.com/gaschz/qubes-pass.git
synced 2025-06-07 01:38:31 +02:00
Only validate if passwords match when inputting from tty.
This commit is contained in:
parent
bdfd35d89a
commit
5858dabae9
@ -502,9 +502,8 @@ elif opts.subcommand == "insert":
|
|||||||
|
|
||||||
contents = promptpw("Enter password for %s: " % (opts.key,))
|
contents = promptpw("Enter password for %s: " % (opts.key,))
|
||||||
pw2 = promptpw("Retype password for %s: " % (opts.key,))
|
pw2 = promptpw("Retype password for %s: " % (opts.key,))
|
||||||
if contents != pw2:
|
if sys.stdin.isatty() and contents != pw2:
|
||||||
if sys.stdin.isatty():
|
print("Error: the entered passwords do not match.", file=sys.stderr)
|
||||||
print("Error: the entered passwords do not match.", file=sys.stderr)
|
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
sys.exit(pass_manage(opts.subcommand, opts.key, str(int(opts.multiline)), contents))
|
sys.exit(pass_manage(opts.subcommand, opts.key, str(int(opts.multiline)), contents))
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user