summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Shore <brian@networkredux.com>2013-09-12 14:38:35 -0700
committerJason A. Donenfeld <Jason@zx2c4.com>2013-09-14 19:15:16 +0200
commit79d5267d5911d753ab6ba3cb4c12c919312a85fc (patch)
tree863e112a5c2125b2a83997beecd62a43a42a01b9 /src
parentc832d4647439a0d504a310fba51f20dcb5051c47 (diff)
downloadpass-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-xsrc/password-store.sh2
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
4b03e906cca75a7c&follow=1'>Fix cache algorithm loopholeLars Hjemli3-11/+16 This closes the door for unneccessary calls to cgit_fill_cache(). Noticed by Linus. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2006-12-10Add version identifier in generated filesLars Hjemli2-9/+14 Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2006-12-10Add license file and copyright noticesLars Hjemli5-0/+372 Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2006-12-10Add caching infrastructureLars Hjemli9-28/+353 This enables internal caching of page output. Page requests are split into four groups: 1) repo listing (front page) 2) repo summary 3) repo pages w/symbolic references in query string 4) repo pages w/constant sha1's in query string Each group has a TTL specified in minutes. When a page is requested, a cached filename is stat(2)'ed and st_mtime is compared to time(2). If TTL has expired (or the file didn't exist), the cached file is regenerated. When generating a cached file, locking is used to avoid parallell processing of the request. If multiple processes tries to aquire the same lock, the ones who fail to get the lock serves the (expired) cached file. If the cached file don't exist, the process instead calls sched_yield(2) before restarting the request processing. Signed-off-by: Lars Hjemli <hjemli@gmail.com>