mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-09-07 15:07:17 +00:00
CodeQL alert 318 (js/remote-property-injection). setDevices guarded the status_update write with a plain "!prev[msg.deviceId]" truthy check; a deviceId of "__proto__" or "constructor" resolves through the prototype chain to a truthy value, so it would pass the guard despite not being a real known device, letting the spread write a bogus own-property (not actual prototype pollution -- computed keys in object literals use [[DefineOwnProperty]], not the legacy __proto__ setter -- but still corrupts the rendered device list). Use Object.prototype.hasOwnProperty.call for a real own-property check; avoided Object.hasOwn (ES2022, Safari 15.4+) given #649's recent Safari-15.0 compatibility work. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>