Skip to content

Update Zip Encryption mode state checks - #136220

Merged
alinpahontu2912 merged 2 commits into
dotnet:mainfrom
alinpahontu2912:refactor/zip-encryption-state
Oct 21, 2026
Merged

alinpahontu2912 merged 2 commits into
dotnet:mainfrom
alinpahontu2912:refactor/zip-encryption-state

Conversation

@alinpahontu2912

Copy link
Copy Markdown
Member

Small refactor to improve zip entries checking their encryption

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @karelz, @dotnet/area-system-io-compression
See info in area-owners.md if you want to be subscribed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The narrowly scoped refactor preserves encryption handling in the reviewed paths, with no unresolved findings.

No open issues 🎉

What changed in this PR

Simplifies ZIP entry encryption-state checks across synchronous and asynchronous operations.

Changes:

  • Consolidates AES checks around EncryptionMethod.
  • Removes redundant header-compression state and ZipCrypto predicates.
  • Updates read, write, and update paths consistently.

No builds or tests were run.

File Description
src/​libraries/​System.IO.Compression/​src/​System/​IO/​Compression/​ZipArchiveEntry.cs Consolidates encryption checks and removes redundant state.
src/​libraries/​System.IO.Compression/​src/​System/​IO/​Compression/​ZipArchiveEntry.Async.cs Aligns asynchronous encryption checks with synchronous paths.

Review effort: Balanced

@rzikm rzikm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if CI is green

@alinpahontu2912
alinpahontu2912 merged commit a485c81 into dotnet:main Oct 21, 2026
90 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Oct 22, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants