Repository navigation
test: validate RAR5 and 7z archives with encrypted headers - #196
Merged
Merged
Conversation
Add a RAR5 fixture from SharpCompress and a generated 7z (-mhe=on) whose file lists are encrypted. Listing without the password asks for it, a wrong one is refused and the right one lists and extracts. 7z has no password check value, so a wrong password surfaced as a corrupt header and the browser showed an error instead of asking again. When the header can only be read with a password, a decoding failure with a password is now reported as a wrong password. Co-Authored-By: Claude Opus 5.5 <[email protected]>
nextestudios
force-pushed
the
feature/70-encrypted-headers
branch
from
September 27, 2026 22:12
96423cc to
f3f35dd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rar/Rar5.encrypted_filesAndHeader.rar(copied unchanged from SharpCompress, MIT, same commit as the other fixtures) and7z/cabecalho-protegido.7z(286 bytes, generated with 7-Zip 25.01-mhe=on; provenance intests/Fixtures/README.md).SharpCompressEnginenow reportsWrongPasswordwhen a decoding failure happens with a password and the header can only be read with one.CanReadEncryptedHeadersis now true for 7z and RAR;docs/archive-support.mdupdated with observed results (RAR4 header encryption still has no fixture and stays unvalidated).Tests (CI)
FormatTests.Header_encrypted_archive_lists_and_extracts_only_with_the_right_password(RAR5 + 7z): missing → PasswordRequired, wrong → WrongPassword (inspect and extract), right → every file is encrypted, lists and extracts with known SHA-256.ArchiveBrowserJourneyTests: opening the header-encrypted 7z asks for the password before listing, a wrong one re-asks with "Senha incorreta. Tente novamente.", the right one lists the entries.No UI change; no manual checks needed.
Closes #70
🤖 Generated with Claude Code