How secure are temp files created via tempfile.TemporaryFile()?

MRAB python at mrabarnett.plus.com
Thu Feb 18 14:33:11 EST 2010


python at bdurham.com wrote:
> I'm doing a code review of an application that occassionally writes 
> blocks of secure data to temp files created with tempfile.TemporaryFile( 
> delete=True ).
>  
> How secure are temp files created via tempfile.TemporaryFile( delete=True )?
>  
> Are there OS specific nuances I should be concerned about regarding use 
> of this function on Windows (XP or higher) or Linux?
>  
Well, the contents of temp files aren't encrypted, if that's what you're
asking, so if you're writing unencrypted data to a temp file then other
applications could read it.



More information about the Python-list mailing list