Repository navigation
perf(core): Avoid repeated sensitive denylist normalization - #6704
Merged
0xadam-brown merged 3 commits intoNov 20, 2026
Merged
0xadam-brown merged 3 commits into
0xadam-brown merged 3 commits into
Conversation
Match built-in sensitive terms in their existing lowercase form and normalize only the input key. Reuse this path for query parameters and headers while preserving case-insensitive matching for caller-configured terms. Cover mixed-case matching, sensitive allowlist precedence, empty terms, and locale independence. Co-Authored-By: Codex <noreply@openai.com>
Contributor
PR risk: mediumFor commit Main concerns: reach, data sent to Sentry, host performance. This label is a hint for reviewers, not an approval. |
📲 Install BuildsAndroid
|
Preserve the original filtering examples and add dedicated casing tests for query parameters and headers in allowlist and denylist modes. Co-Authored-By: Codex <noreply@openai.com>
Describe the added cases using the behavior-based naming already used in HttpUtilsTest. Co-Authored-By: Codex <noreply@openai.com>
0xadam-brown
commented
Nov 20, 2026
0xadam-brown
marked this pull request as ready for review
November 20, 2026 12:08
0xadam-brown
requested review from
markushi and
runningcode
and removed request for
a team
November 20, 2026 12:08
runningcode
approved these changes
Nov 20, 2026
romtsn
approved these changes
Nov 20, 2026
0xadam-brown
deleted the
0xadam-brown/perf/avoid-repeated-denylist-normalization-standalone
branch
November 20, 2026 13:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A bug I found while doing some tangentially-related Nav3 work.
📜 Description
PR eliminates redundant work when filtering sensitive data from HTTP headers, query parameters, and cookies.
Previously, we'd repeatedly scan already-lowercase denylist terms to try to (pointlessly) lowercase them again, and we'd do so for every query parameter or header name we checked. Now we don't.
SDK behavior is unchanged.
💡 Motivation and Context
Sensitive-data filtering runs repeatedly as the SDK collects request data. Lowercasing the same fixed denylist terms for every name adds unnecessary work; using their known lowercase form removes that repetition without changing which values are filtered. Built-in sensitive keys continue to take precedence over allowlists, and matching remains independent of the device's default locale.
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
#skip-changelog