[New-bugs-announce] [issue45287] zipfile.is_zipfile returns true for a rar file containing zips

mxmlnkn report at bugs.python.org
Sat Sep 25 10:20:18 EDT 2021


New submission from mxmlnkn <maxinator333 at googlemail.com>:

I have created a RAR file containing two zip files like this:

zip bag.zip README.md CHANGELOG.md
zip bag1.zip CHANGELOG.md
rar a zips.rar bag.zip bag1.zip

And when calling `zipfile.is_zipfile` on zips.rar, it returns true even though it obviously is not a zip. The zips.rar file doesn't even begin with the magic bytes `PK` for zip but with `Rar!`.

----------
files: zips.rar
messages: 402624
nosy: mxmlnkn
priority: normal
severity: normal
status: open
title: zipfile.is_zipfile returns true for a rar file containing zips
Added file: https://bugs.python.org/file50305/zips.rar

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45287>
_______________________________________


More information about the New-bugs-announce mailing list