[issue7467] The zipfile module does not check files' CRCs, including in ZipFile.testzip

2010-08-13 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: After chatting with __ap__ on irc, i'm going to reject this patch for 2.6.6. -- nosy: +barry priority: release blocker -> status: open -> closed ___ Python tracker __

[issue7467] The zipfile module does not check files' CRCs, including in ZipFile.testzip

2010-08-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: At Barry's request, here is a patch for potential backport to 2.6. -- Added file: http://bugs.python.org/file18492/zipcrc.patch ___ Python tracker _

[issue7467] The zipfile module does not check files' CRCs, including in ZipFile.testzip

2010-08-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue7467] The zipfile module does not check files' CRCs, including in ZipFile.testzip

2010-08-12 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- priority: normal -> release blocker versions: +Python 2.6 -Python 2.7, Python 3.1, Python 3.2 ___ Python tracker ___ __

[issue7467] The zipfile module does not check files' CRCs, including in ZipFile.testzip

2010-08-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ah, indeed. I've committed an updated patch in r83959 (py3k), r83962 (3.1) and r83961 (2.7). Thank you! -- resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tr

[issue7467] The zipfile module does not check files' CRCs, including in ZipFile.testzip

2010-08-12 Thread Nir Aides
Nir Aides added the comment: But you answered my question with code :) self._file_size is now unused and may be removed. -- ___ Python tracker ___ __

[issue7467] The zipfile module does not check files' CRCs, including in ZipFile.testzip

2010-08-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, here is a new patch with a simpler logic. I've also added tests with a deflated zipfile entry with a bad CRC (in addition to the one with a stored zipfile entry). > Finally, is it possible to determine end of file if length of 'data' > (computed for crc)

[issue7467] The zipfile module does not check files' CRCs, including in ZipFile.testzip

2010-08-12 Thread Nir Aides
Nir Aides added the comment: I think patch may be simplified. Instead of keeping track of CRC offset, invoke it directly on the 'data' variable being added to _readbuffer. Also the call to _update_crc() before the return from read1() looks redundant. Finally, is it possible to determine end

[issue7467] The zipfile module does not check files' CRCs, including in ZipFile.testzip

2010-08-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Nir, want to take a look? -- nosy: +nirai ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue7467] The zipfile module does not check files' CRCs, including in ZipFile.testzip

2010-08-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is an updated patch with fixed (hopefully) CRC logic in the face of buffering, and additional tests. -- Added file: http://bugs.python.org/file18461/zipcrc.patch ___ Python tracker

[issue7467] The zipfile module does not check files' CRCs, including in ZipFile.testzip

2010-08-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Actually, there are two places where the internal buffer is trimmed from consumed data: self._readbuffer = self._readbuffer[self._offset:] + data self._offset = 0 At this point, it seems self._crc_offset should also be reset to zero,

[issue7467] The zipfile module does not check files' CRCs, including in ZipFile.testzip

2010-08-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch looks good to me. -- assignee: -> pitrou nosy: +pitrou resolution: -> accepted stage: needs patch -> patch review ___ Python tracker ___

[issue7467] The zipfile module does not check files' CRCs, including in ZipFile.testzip

2010-07-13 Thread Douglas Turk
Changes by Douglas Turk : -- keywords: +patch Added file: http://bugs.python.org/file17984/fix_zipfile_crc_issue_7467.patch ___ Python tracker ___

[issue7467] The zipfile module does not check files' CRCs, including in ZipFile.testzip

2010-07-11 Thread Mark Lawrence
Mark Lawrence added the comment: Douglas could you please provide a patch. -- nosy: +BreamoreBoy stage: -> needs patch versions: +Python 3.1, Python 3.2 -Python 2.6 ___ Python tracker _

[issue7467] The zipfile module does not check files' CRCs, including in ZipFile.testzip

2009-12-09 Thread Douglas Turk
New submission from Douglas Turk : The zipfile module does not calculate the CRC of files in a zipfile as they are read as of Python 2.6. The old ZipFile.read function in Python 2.5 used to do this, and ZipFile.testzip appears to rely on ZipFile.read to check the CRC. This means that ZipFile.test