Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix https://github.com/dotnet/runtime/issues/110899 #110900

Closed
wants to merge 1 commit into from

Conversation

tony-hu-avepoint
Copy link

#110899
don't flush stream at read mode.

dotnet#110899
don't flush stream at read mode.
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Dec 23, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones
See info in area-owners.md if you want to be subscribed.

@vcsjones
Copy link
Member

This has been mentioned in other issues such as #80427 and #25129, but Dispose calling Flush even on a read Stream is intentional.

My comment is that CryptoStream has had this behavior for at least 12 years (I checked 2.0, I assume it had it since 1.1, making it almost 15 years), and that at least one Stream type (FileStream) has an observable effect from calling Flush. Therefore it is probable that someone has a dependency on Flush being called from CryptoStream on a custom stream type (and no one has a dependency on Flush not being called by CryptoStream).

@tony-hu-avepoint
Copy link
Author

This has been mentioned in other issues such as #80427 and #25129, but Dispose calling Flush even on a read Stream is intentional.

My comment is that CryptoStream has had this behavior for at least 12 years (I checked 2.0, I assume it had it since 1.1, making it almost 15 years), and that at least one Stream type (FileStream) has an observable effect from calling Flush. Therefore it is probable that someone has a dependency on Flush being called from CryptoStream on a custom stream type (and no one has a dependency on Flush not being called by CryptoStream).

Appreciate the clarification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Security community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants