my dotz
0

Configure Feed

Select the types of activity you want to include in your feed.

add some more checks to pw_edit

+6
+6
bin/pa
··· 52 52 pw_edit() { 53 53 name=$1 54 54 55 + if [ ! -f "$name.age" ]; then 56 + die "Failed to access $name" 57 + fi 58 + 55 59 # we use /dev/shm because it's an in-memory 56 60 # space that we can use to store private data, 57 61 # and securely wipe it without worrying about ··· 64 68 trap 'rm -rf /dev/shm/pa' EXIT 65 69 tmpfile="/dev/shm/pa/$name.txt" 66 70 71 + age -i ~/.age/key.txt --decrypt "$1.age" > "$tmpfile" 67 72 "${EDITOR:-vi}" "$tmpfile" 68 73 69 74 if [ ! -f $tmpfile ]; then 70 75 die "New password not saved" 71 76 fi 72 77 78 + rm "$name.age" 73 79 age -r "$pubkey" -o "$name.age" "$tmpfile" 74 80 } 75 81