Skip to content

chunkingcookiemanager leaks unused chunks #4639

Closed
@patrick-hampton-avalara

Description

There seems to be a bug in Microsoft.AspNetCore.Authentication.Cookies.ChunkingCookieManager when used in conjunction with CookieAuthentication. What I've seen is that as the size of the Authentication cookie changes the number of chunks needed to the accommodate the cookie data will change as well. If the number of cookies needed decreases, then chunks that are no longer needed are not being cleaned up.

Normally this isn't a big deal, but I'm currently running in a system that has a hard limit on the header size of 10240 bytes. The specify scenario I'm running into has the Authentication cookies going from 2 chunks (3 total cookies) to 1 chunk (1 cookie). This has the added bonus of replacing the value in the cookie that previously stored the chunk count (really small), to now storing the entire Authentication Ticket (relatively large), in turn nearly doubling the amount of header space consumed by the Authentication cookie.

It seems like it could be beneficial to have ChunkingCookieManager expire these "vestigial" as it's setting the new chunks on the response.

Metadata

Metadata

Assignees

Labels

affected-fewThis issue impacts only small number of customersarea-authIncludes: Authn, Authz, OAuth, OIDC, BearerbugThis issue describes a behavior which is not expected - a bug.help candidateIndicates that the issues may be a good fit for community to help with. Requires work from eng. teamseverity-minorThis label is used by an internal tool

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions