Make sure that sensitive data is never written unencrypted.
It is better to write an empty buffer to the file instead.
This commit is contained in:
parent
6a0bdcf05c
commit
aecfdde11d
@ -436,11 +436,13 @@ function s:GPGEncrypt()
|
||||
let &shell = s:shellsave
|
||||
call s:GPGDebug(1, "called gpg command is: " . "'[,']!" . s:GPGCommand . " --quiet --no-encrypt-to " . options . " " . s:stderrredirnull)
|
||||
if (v:shell_error) " message could not be encrypted
|
||||
silent u
|
||||
" delete content of the buffer to be sure no data is written unencrypted
|
||||
" content will be recovered in GPGEncryptPost()
|
||||
silent normal! 1GdG
|
||||
|
||||
echohl GPGError
|
||||
let blackhole = input("Message could not be encrypted! File might be empty! (Press ENTER)")
|
||||
echohl None
|
||||
bwipeout
|
||||
return
|
||||
endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user