diff options
author | Brian Shore <brian@networkredux.com> | 2013-09-12 14:38:35 -0700 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2013-09-14 19:15:16 +0200 |
commit | 79d5267d5911d753ab6ba3cb4c12c919312a85fc (patch) | |
tree | 863e112a5c2125b2a83997beecd62a43a42a01b9 /src | |
parent | c832d4647439a0d504a310fba51f20dcb5051c47 (diff) | |
download | pass-79d5267d5911d753ab6ba3cb4c12c919312a85fc.tar.gz pass-79d5267d5911d753ab6ba3cb4c12c919312a85fc.tar.bz2 pass-79d5267d5911d753ab6ba3cb4c12c919312a85fc.zip |
Fix directory traversal for reencryption when $PREFIX is a symlink
Diffstat (limited to '')
-rwxr-xr-x | src/password-store.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/password-store.sh b/src/password-store.sh index e080627..2d6ba18 100755 --- a/src/password-store.sh +++ b/src/password-store.sh @@ -158,7 +158,7 @@ case "$command" in git_add_file "$ID" "Set GPG id to $gpg_id." if [[ $reencrypt -eq 1 ]]; then - find "$PREFIX" -iname '*.gpg' | while read passfile; do + find "$PREFIX/" -iname '*.gpg' | while read passfile; do gpg2 -d $GPG_OPTS "$passfile" | gpg2 -e -r "$gpg_id" -o "$passfile.new" $GPG_OPTS && mv -v "$passfile.new" "$passfile" done |