[Reproducible-commits] [debbindiff] 01/01: Use path returned by ZipFile.extract
Reiner Herrmann
deki-guest at moszumanska.debian.org
Sun Apr 5 21:13:35 UTC 2015
This is an automated email from the git hooks/post-receive script.
deki-guest pushed a commit to branch master
in repository debbindiff.
commit 9b994e881087257509bbb75de1fd2cc0125ff7bd
Author: Reiner Herrmann <reiner at reiner-h.de>
Date: Sun Apr 5 23:10:00 2015 +0200
Use path returned by ZipFile.extract
Zip member filenames may contain "../", which
is ignored while extracting. ZipFile.extract returns
the actual path where the file is extracted to.
---
debbindiff/comparators/zip.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/debbindiff/comparators/zip.py b/debbindiff/comparators/zip.py
index 3a06a38..0fb9c51 100644
--- a/debbindiff/comparators/zip.py
+++ b/debbindiff/comparators/zip.py
@@ -59,10 +59,8 @@ def compare_zip_files(path1, path2, source=None):
if name.endswith('/'):
continue
logger.debug('extract member %s', name)
- zip1.extract(name, temp_dir1)
- zip2.extract(name, temp_dir2)
- in_path1 = os.path.join(temp_dir1, name)
- in_path2 = os.path.join(temp_dir2, name)
+ in_path1 = zip1.extract(name, temp_dir1)
+ in_path2 = zip2.extract(name, temp_dir2)
differences.extend(
debbindiff.comparators.compare_files(
in_path1, in_path2,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/debbindiff.git
More information about the Reproducible-commits
mailing list