Author tlynn
Recipients tlynn
Date 2012-09-03.19:47:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1346701660.86.0.976031645545.issue15858@psf.upfronthosting.co.za>
In-reply-to
Content
The tarfile module silently truncates the list of entries when reading a tar file if it sees an entry with a uid/gid field containing only spaces/NULs.  I got such a tarball from Java Maven/plexus-archiver.  I don't know whether they write such fields deliberately, but it seems reasonable to me, especially since they were providing the user/group names textually.

I'd like to see two fixes - a None/-1/0 value for the uid/gid and not silently swallowing HeaderErrors in TarFile.next() (or at least documenting why it's being done).  0 would be consistent with the default value when writing, but None seems more honest.  -1 seems hard to defend.

Only tested on silly Python versions (2.6, PyPy-1.8), sorry.  It's what I've got to hand, but I think this issue also applies to recent Python too going by looking at the hg trunk.
History
Date User Action Args
2012-09-03 19:47:40tlynnsetrecipients: + tlynn
2012-09-03 19:47:40tlynnsetmessageid: <1346701660.86.0.976031645545.issue15858@psf.upfronthosting.co.za>
2012-09-03 19:47:40tlynnlinkissue15858 messages
2012-09-03 19:47:39tlynncreate