Skip to content

fix(smartSearchBar): Handle prototype filter keys#116999

Merged
scttcper merged 1 commit into
masterfrom
scttcper/mutable-search-null-index
Jun 5, 2026
Merged

fix(smartSearchBar): Handle prototype filter keys#116999
scttcper merged 1 commit into
masterfrom
scttcper/mutable-search-null-index

Conversation

@scttcper

@scttcper scttcper commented Jun 5, 2026

Copy link
Copy Markdown
Member

Follow-up from #116996 prevents a page crash when typing constructor:

Use a null-prototype accumulator when collecting filter values so keys like constructor are treated as data keys.

Co-authored-by: Codex GPT-5 <noreply@openai.com>
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 5, 2026
@scttcper scttcper marked this pull request as ready for review June 5, 2026 21:30
@scttcper scttcper changed the title fix(search): Handle prototype filter keys fix(smartSearchBar): Handle prototype filter keys Jun 5, 2026
@scttcper scttcper requested a review from a team June 5, 2026 21:31
@scttcper scttcper merged commit 4d76517 into master Jun 5, 2026
80 checks passed
@scttcper scttcper deleted the scttcper/mutable-search-null-index branch June 5, 2026 21:43
scttcper added a commit that referenced this pull request Jun 5, 2026
Follow-up to #116999 for recent search suggestions. `__proto__:a` could
still come back from recent searches, and the filter-key list treated it
as a real key through object prototype lookup before the recent-filter
counter tried to mutate `Object.prototype`.

This uses own-property checks and a null-prototype counter so
prototype-ish recent searches stay invalid like any other unknown filter
key.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants