emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug: epg send unencrypted data in trash


From: Ted Zlatanov
Subject: Re: bug: epg send unencrypted data in trash
Date: Fri, 11 Feb 2011 13:54:07 -0600
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

On Fri, 11 Feb 2011 19:16:13 +0100 Thierry Volpiatto <address@hidden> wrote: 

TV> Thierry Volpiatto <address@hidden> writes:
>> i start using recently delete-by-moving-to-trash.(i had no trash before)
>> So now when i decrypt a file and read it in emacs, i have an unencrypted
>> file world readable 'epg-output-xxx' in the trash.
>> That's bad.

TV> So if one use gnus with a .authinfo.gpg, and use also
TV> delete-by-moving-to-trash, he will have the bad surprise to find his
TV> authinfo data in clear text in the trash.

TV> Maybe let-bind delete-by-moving-to-trash in epg-delete-output-file would
TV> be good.
TV> It's what i will do here anyway.

TV> (defun epg-delete-output-file (context)
TV>   "Delete the output file of CONTEXT."
TV>   (let ((delete-by-moving-to-trash nil))
TV>     (when (and (epg-context-output-file context)
TV>              (file-exists-p (epg-context-output-file context)))
TV>       (delete-file (epg-context-output-file context)))))

TV> With this change, data in clear text will never go to trash.

According to the docs for `delete-file' it shouldn't matter what
`delete-by-moving-to-trash' says because this is called
non-interactively (TRASH is nil when delete-file is called
non-interactively).  Or is this funcall interactive somehow?

Ted




reply via email to

[Prev in Thread] Current Thread [Next in Thread]