ZIP encryption extraction fails with "invalid password" error #197
Labels
No labels
agent/review
priority/high
priority/low
priority/medium
status/blocked
status/wontfix
time/marathon
time/quickwin
type/bug
type/cicd
type/docs
type/feature
type/security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
thwap/manta-archiver#197
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
ZIP encryption support was added in commit
94076a7. While listing encrypted archives works correctly, extraction fails withzip: invalid passworderror for both traditional PKWARE and AES-256 encryption methods.Steps to reproduce
Error: error extracting secret.txt: zip: invalid passwordExpected behavior
Extraction should succeed with the correct password.
Possible cause
The password may not be properly applied to the file entry when reading data during extraction, even though it works for listing. The issue might be in the interaction between the archive reader and the zip package's decryption logic.
Impact
Encrypted ZIP archives cannot be extracted, limiting the usefulness of the encryption feature.
Priority: Medium
Labels: bug, zip, encryption
Fixed in commit
a21f2b5The extraction bug was caused by missing password setting for the main archive reader in
runExtract()andrunValidate()functions. The password was only set for the parity data reader used during repair operations.Changes made:
runExtract()(lines 1344-1350)runValidate()(lines 1777-1783)Testing performed:
The fix is minimal and follows the same pattern already used in
runList(),runConvert(), andrunRepair().