Repository navigation
Reapply encrypted RAR header rescan fix to release - #1432
Merged
Merged
Conversation
Reset scan-specific encryption state in sync and async header readers while retaining the KDF cache. Add RAR4/RAR5 rescan and solid encrypted extraction regression coverage. Fixes #1422
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The state reset is correctly mirrored across sync and async paths with focused regression coverage; #1431 must still merge first.
0 open findings
What changed in this PR
Reapplies the encrypted RAR header rescan fix to the clean release history.
Changes:
- Resets sync and async scan-specific encryption state while retaining the RAR5 KDF cache.
- Adds RAR4/RAR5 rescan and solid encrypted extraction regression coverage.
- Includes the stacked uppercase split-ZIP prerequisite from #1431.
| File | Description |
|---|---|
src/SharpCompress/Common/Rar/Headers/RarHeaderFactory.cs |
Resets encryption state before synchronous scans. |
src/SharpCompress/Common/Rar/Headers/RarHeaderFactory.Async.cs |
Applies the reset to asynchronous scans. |
tests/SharpCompress.Test/Rar/RarEncryptedHeaderScanTests.cs |
Covers rescans and solid extraction paths. |
tests/TestArchives/Archives/Rar5.solid.encrypted_headers.rar |
Provides the solid encrypted-header fixture. |
src/SharpCompress/Archives/Zip/ZipArchiveVolumeFactory.cs |
Normalizes uppercase ZIP extensions for split-part lookup. |
tests/SharpCompress.Test/Zip/ZipArchiveTests.cs |
Tests uppercase ZIP split-part discovery. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This was referenced Oct 9, 2026
This was referenced Oct 12, 2026
Merged
Merged
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
Reapplies #1427 to the clean
releasehistory after the accidental master merge was removed.Reset scan-specific encryption state in synchronous and asynchronous header readers while preserving the KDF cache. Restore encrypted-header rescan regression coverage and the solid RAR5 fixture.
060f8f84bc58792b2071e903Review and merge order
Recovery PR 2 of 5. Depends on #1431. Merge that PR first.
All recovery PRs target
release. These branches are stacked, so this diff includes earlier recovery changes until the preceding PRs land. Review the replayed commit above for this PR's specific change. Merge in sequence using merge commits or fast-forward semantics to preserve shared ancestry; squash/rebase merging would require restacking the later branches.The RAR comment test correction (
e5c3ec6a) is already present in the clean base, so its checkpoint branch needs no separate PR. No master-only commits were replayed.Validation
Validated the completed recovery stack on .NET 10:
dotnet csharpier check .passed.Validation was performed on the final stack, not separately on every intermediate branch.