]> gitweb.fluxo.info Git - keyringer.git/commitdiff
Workaround for open/edit action returning instantaneously (#49)
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 16 May 2014 18:37:55 +0000 (15:37 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 16 May 2014 18:37:55 +0000 (15:37 -0300)
ChangeLog
lib/keyringer/actions/edit

index 029a54666d5017a7b5955ebfa0a4392b2f0615c3..e4e7ede24848ba788f1397873c75e70101f46d75 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2014-05-16 - Silvio Rhatto <rhatto@riseup.net>
 
+       Workaround for open/edit action returning instantaneously (#49)
+
        Use 'nobackup' and 'nowritebackup' if VIM is set as $EDITOR (#50)
 
        Find: rollback: use find+grep instead of 'find -iname' (#53)
index 576bb6789ec8d28bb4675699af327f9a6c7921ad..63017d56605263852e2a485f22946207e3fae1ec 100755 (executable)
@@ -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"