summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-05-16 15:37:55 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-05-16 15:37:55 -0300
commit845e593c84661f05576f96da9e384a671ca56e53 (patch)
treed5c2691b44dcd50f2b6c61d544516f6a23b64dfc /lib
parent4c5157f9ffbae18f3914b5fb58c07e8d895f1732 (diff)
downloadkeyringer-845e593c84661f05576f96da9e384a671ca56e53.tar.gz
keyringer-845e593c84661f05576f96da9e384a671ca56e53.tar.bz2
Workaround for open/edit action returning instantaneously (#49)
Diffstat (limited to 'lib')
-rwxr-xr-xlib/keyringer/actions/edit14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/keyringer/actions/edit b/lib/keyringer/actions/edit
index 576bb67..63017d5 100755
--- a/lib/keyringer/actions/edit
+++ b/lib/keyringer/actions/edit
@@ -38,11 +38,23 @@ fi
# Prompt
echo "Press any key to open the decrypted data with $APP, Ctrl-C to abort"
-echo "WARNING: please make sure that $APP doesn't leak data to external applications os files"
+echo "WARNING: please make sure that $APP doesn't leak data to external applications or files"
read key
$APP "$TMPWORK"
+
+# Wait for background process to finish
wait
+# Workaround for some applications running in client/server mode, handling open file requests
+# to a daemon and exiting immediatelly, making keyringer guess the editing is over and the file
+# must be encrypted again (See #49).
+#
+# Thus, we cannot just wipe the file and exit keyringer, as the user might have a buffered copy
+# of the unencrypted file in the application, which can lead to information leakage if the user
+# saves the file and leaves the editor.
+echo "Press any key when done using the file and you're sure that $APP is closed."
+read -n 1
+
# Encrypt again
export KEYRINGER_ADD_EXTENSION=false
keyringer_exec encrypt "$BASEDIR" "$FILE" "$TMPWORK"