[issue15858] tarfile missing entries due to omitted uid/gid fields

2015-12-08 Thread Martin Panter
Martin Panter added the comment: Yes I think you are right. With Python 3.5.0: $ python3 -c 'import tarfile; print(tarfile.open("bad.tar").getnames())' ['foo', 'foo/a'] $ python3 -m tarfile --list bad.tar foo/ foo/a The proposed fix here is slightly different: truncate from the first space,

[issue15858] tarfile missing entries due to omitted uid/gid fields

2015-12-08 Thread Tom Lynn
Tom Lynn added the comment: I think issue24514 (fixed in Py2.7.11) is a duplicate of this issue. -- ___ Python tracker ___ ___ Python-

[issue15858] tarfile missing entries due to omitted uid/gid fields

2014-12-31 Thread A.M. Kuchling
Changes by A.M. Kuchling : -- nosy: -akuchling ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue15858] tarfile missing entries due to omitted uid/gid fields

2014-07-25 Thread Adam Tauno Williams
Adam Tauno Williams added the comment: test fails for me with provided bad.tar [as described in comment] but test passed after applying patch to tarfile. -- nosy: +whitemice ___ Python tracker

[issue15858] tarfile missing entries due to omitted uid/gid fields

2014-02-23 Thread Eric Floehr
Eric Floehr added the comment: I have attached a patch file for test_tarfile.py that uses the attached 'bad.tar' to test this issue. After applying this test patch, put 'bad.tar' in Lib/test with the name 'issue15858.tar'. This tests Tarfile.next(), but the issue can be seen via the command l

[issue15858] tarfile missing entries due to omitted uid/gid fields

2014-01-15 Thread Tom Lynn
Tom Lynn added the comment: The secondary issue, which the patch doesn't address, is that TarFile.next() seems unpythonic; it treats any {Invalid,Empty,Truncated}HeaderError after offset 0 as EOF rather than propagating the exception. It looks deliberate, but I'm not sure why it would be done

[issue15858] tarfile missing entries due to omitted uid/gid fields

2014-01-15 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: -> test needed versions: +Python 2.7, Python 3.3, Python 3.4 -3rd party, Python 2.6 ___ Python tracker ___ __

[issue15858] tarfile missing entries due to omitted uid/gid fields

2013-11-11 Thread A.M. Kuchling
A.M. Kuchling added the comment: Here's the changes from patch.py, put into patch format. I took out the inlining for ntb() and support for different tarfile APIs, and also replaced the use of .split(,1)[0] by .partition(). -- nosy: +akuchling Added file: http://bugs.python.org/file32

[issue15858] tarfile missing entries due to omitted uid/gid fields

2012-09-05 Thread Tom Lynn
Tom Lynn added the comment: patch.py attached - what I'm using as a workaround at the moment. -- Added file: http://bugs.python.org/file27130/patch.py ___ Python tracker ___

[issue15858] tarfile missing entries due to omitted uid/gid fields

2012-09-05 Thread Tom Lynn
Tom Lynn added the comment: See attached bad.tar. $ less bad.tar | cat drwxr-xr-x 0/0 0 2012-09-05 20:04 foo/ -rw-rw-r-- uname/gname 0 2012-09-05 20:04 foo/a $ python -c 'import tarfile; print(tarfile.open("bad.tar").getnames())' ['foo'] $ python -c 'import tarfile, patch; pa

[issue15858] tarfile missing entries due to omitted uid/gid fields

2012-09-05 Thread Lars Gustäbel
Lars Gustäbel added the comment: Could you provide some sample data and code? I see the problem, but I cannot quite reproduce the behaviour you describe. In all of my testcases tarfile either throws an exception or successfully reads the archive, but never silently stops. -- assignee:

[issue15858] tarfile missing entries due to omitted uid/gid fields

2012-09-04 Thread Tom Lynn
Tom Lynn added the comment: I think the default has to be 0 for consistency with how other empty numeric fields are handled. In theory spaces and NULs are supposed to be equivalent terminators in numeric fields, but I've just noticed that plexus-archiver is also using leading spaces rather th

[issue15858] tarfile missing entries due to omitted uid/gid fields

2012-09-03 Thread Ned Deily
Changes by Ned Deily : -- nosy: +lars.gustaebel ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue15858] tarfile missing entries due to omitted uid/gid fields

2012-09-03 Thread Tom Lynn
New submission from Tom Lynn: 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