password-store

Simple password manager using gpg and ordinary unix directories
git clone https://git.zx2c4.com/password-store
Log | Files | Refs | README | LICENSE

commit ffef92ee0ed10551b20521f2d6e5637c8f9da798
parent 94ac2ba2c6baa268a64cb4e96421f6f1bf96fd96
Author: Jason A. Donenfeld <Jason@zx2c4.com>
Date:   Thu,  8 Feb 2018 23:16:26 +0100

generate: disallow zero length generated passwords

Diffstat:
Msrc/password-store.sh | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/password-store.sh b/src/password-store.sh @@ -505,7 +505,8 @@ cmd_generate() { local path="$1" local length="${2:-$GENERATED_LENGTH}" check_sneaky_paths "$path" - [[ ! $length =~ ^[0-9]+$ ]] && die "Error: pass-length \"$length\" must be a number." + [[ $length =~ ^[0-9]+$ ]] || die "Error: pass-length \"$length\" must be a number." + [[ $length -gt 0 ]] || die "Error: pass-length must be greater than zero." mkdir -p -v "$PREFIX/$(dirname -- "$path")" set_gpg_recipients "$(dirname -- "$path")" local passfile="$PREFIX/$path.gpg"