From 884b46fce7aa71ffb4084e8f423241322a5135db Mon Sep 17 00:00:00 2001 From: Andrea Brancaleoni Date: Wed, 1 Apr 2020 16:14:41 +0200 Subject: [PATCH] fix: strip extra data from release zips (#22891) --- script/release/uploaders/upload.py | 87 ++++++++++++++++++++++++++---- 1 file changed, 78 insertions(+), 9 deletions(-) diff --git a/script/release/uploaders/upload.py b/script/release/uploaders/upload.py index 670c2e890f3f..2261e528bbc6 100755 --- a/script/release/uploaders/upload.py +++ b/script/release/uploaders/upload.py @@ -182,35 +182,104 @@ def zero_zip_date_time(fname): def _zero_zip_date_time(zip_): - """ Code under MIT from https://github.com/Code0x58/python-stripzip/blob/f1980fcfc55cb6ee1f83a2f72244dd38b3b649f4/stripzip.py """ - archive_size = os.fstat(zip_.fileno()).st_size + def purify_extra_data(mm, offset, length): + extra_header_struct = Struct("