Author kasal
Recipients kasal
Date 2012-02-23.10:46:31
SpamBayes Score 1.02981e-05
Marked as misclassified No
Message-id <1329993992.32.0.270050568564.issue14099@psf.upfronthosting.co.za>
In-reply-to
Content
When a file inside a zip is open, the underlying zip file is open again.
(Unless the file name is unknown, because the ZipFile object was created with fp only.)

This design is incorrect, insecure, and ineffective:
- the reopen uses the same string as file name, but on unix-like systems that file name may no longer exist, or may point to a different file
- opening n files from the same zip archive consumes n OS file descriptors, wasting resources

I believe that the parent ZipFile object and all the child ZipExtFile objects should keep the same fp.  The last one would close it.

I'm working on a patch currently.
History
Date User Action Args
2012-02-23 10:46:32kasalsetrecipients: + kasal
2012-02-23 10:46:32kasalsetmessageid: <1329993992.32.0.270050568564.issue14099@psf.upfronthosting.co.za>
2012-02-23 10:46:31kasallinkissue14099 messages
2012-02-23 10:46:31kasalcreate