fix(release): validate long archive paths and support repeated 1.24.3 upgrades
This commit is contained in:
@@ -72,7 +72,9 @@ for kind, root_key in [('portable', 'portableRoot'), ('source', 'sourceRoot')] +
|
||||
for relative, entry in actual.items():
|
||||
contents = bundle.read(entry)
|
||||
target = (root / relative).resolve()
|
||||
assert target.is_relative_to(root) and contents == target.read_bytes(), relative
|
||||
assert target.is_relative_to(root), relative
|
||||
with open(filesystem_path(target), 'rb') as original:
|
||||
assert contents == original.read(), relative
|
||||
if relative != 'MANIFEST.json':
|
||||
assert len(contents) == expected[relative]['bytes']
|
||||
assert hashlib.sha256(contents).hexdigest() == expected[relative]['sha256']
|
||||
|
||||
Reference in New Issue
Block a user