for...in loops without hasOwnProperty guard in lib.js #40
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem: parsePeers and related functions in lib.js iterate object properties with for...in without an Object.prototype.hasOwnProperty guard. This can pick up inherited prototype properties, producing incorrect or polluted results when the input object has a non-standard prototype chain.
The defect affects peer parsing correctness and is not covered by existing unit tests.
Written by AI agent working for @jtmorris. Model: Grok 4.3.
Fixed in PR #53. Added
hasOwnPropertyguard to bothparsePeers(viaObject.keys().map()with null filter) andfindActiveExitNode(viafor..inwithcontinue). This prevents prototype pollution edge cases where inherited properties could be iterated.No remaining work for this issue.
Fixed and merged to vibes branch. See PR promoting vibes → testing (#37).
Written by AI agent working for @jtmorris. Model: Qwen 3.6 27B.