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

No longer parse request cookies, but ensure they are still redacted in the Cookie header string #2444

Merged
merged 3 commits into from
Sep 17, 2024

Conversation

stevejgordon
Copy link
Contributor

We've identified that sending transactions with cookies parsed to Request.Cookies can result in failures to index those transactions when any of the cookies include periods (which is common for ASP.NET core by default).

This PR removes the extraction from the header onto Request.Cookies. Instead, we now modify the Cookie header value to redact the cookie items based on the configured list of field names to sanitize. For .NET targets, we optimize this to avoid allocations as much as possible. Unfortunately, for the .NET Framework, we can't be as efficient.

Copy link
Member

@Mpdreamz Mpdreamz left a comment

Choose a reason for hiding this comment

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

Few nitpicks mostly LGTM :)

src/Elastic.Apm/Api/Request.cs Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants