Repository navigation
Fix editor search indexing of __proto__ node names - #5980
Merged
Merged
Conversation
…for __proto__ detection
|
|
__proto__ node names #5979__proto__ node names
knolleary
reviewed
Oct 4, 2026
knolleary
reviewed
Oct 4, 2026
knolleary
left a comment
Member
There was a problem hiding this comment.
Thanks for this. One small change needed before we can merge.
Co-authored-by: Nick O'Leary <[email protected]>
knolleary
approved these changes
Oct 6, 2026
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.
Proposed changes
Fixes #5979.
Importing a Comment node named
__proto__leaves the import dialog open and causes JavaScript errors because the search index writes the node entry toObject.prototype.Initialize and clear the search index with
Object.create(null)so__proto__is treated as an ordinary key. Import now completes, and the node appears in search results.Add regression tests for node labels and property values, checking that search finds the node and
Object.prototyperemains unchanged.Validation
npm run test: 2865 passing, 60 pending, 1 failing.The failure was in
watch Node — should watch a sub directory in a directory to be changed, followed by anENOENTfrom a delayed test callback.Rerunning the watch suite in isolation passed all 5 tests.
This appears timing-sensitive and unrelated to the editor search change, but the full suite did not pass.
Checklist
npm run testto verify the unit tests pass