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

Delete Stale Chunks #52272

Merged
merged 5 commits into from
Nov 29, 2023
Merged

Delete Stale Chunks #52272

merged 5 commits into from
Nov 29, 2023

Conversation

Tratcher
Copy link
Member

Fixes #4639 for my younger mistakes.

Browsers have limits on how large cookies can be, so we chunk auth cookies by default. If that cookie suddenly shrinks then we don't clean up old chunks. Normally we'd just let the old chunks expire but they can cause issues in some cases where the new cookie plus the old chunk is greater than the servers header size limit.

This fix tries to only delete chunks that won't be overwritten by new ones.

@Tratcher Tratcher self-assigned this Nov 21, 2023
@Tratcher Tratcher added area-auth Includes: Authn, Authz, OAuth, OIDC, Bearer and removed area-security labels Nov 21, 2023
Copy link
Member

@amcasey amcasey left a comment

Choose a reason for hiding this comment

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

LGTM, modulo suggestions.

src/Shared/ChunkingCookieManager/ChunkingCookieManager.cs Outdated Show resolved Hide resolved
src/Shared/ChunkingCookieManager/ChunkingCookieManager.cs Outdated Show resolved Hide resolved
src/Shared/ChunkingCookieManager/ChunkingCookieManager.cs Outdated Show resolved Hide resolved
@Tratcher Tratcher enabled auto-merge (squash) November 22, 2023 21:34
@Tratcher Tratcher added this to the 9.0-preview1 milestone Nov 22, 2023
@BrennanConroy
Copy link
Member

Test failures. You want us to finish this up or you still available to push it through?

@Tratcher Tratcher requested a review from a team as a code owner November 28, 2023 19:43
@Tratcher Tratcher merged commit 9aa8663 into dotnet:main Nov 29, 2023
26 checks passed
@Tratcher Tratcher deleted the tratcher/chunks branch November 29, 2023 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-auth Includes: Authn, Authz, OAuth, OIDC, Bearer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chunkingcookiemanager leaks unused chunks
3 participants