mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
Fix code scanning alert no. 2: Prototype-polluting function
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
@@ -462,10 +462,13 @@ export const highlight = (
|
||||
let i: number
|
||||
|
||||
for (i = 0; i < pathValue.length - 1; i++) {
|
||||
if (pathValue[i] === "__proto__" || pathValue[i] === "constructor") return
|
||||
obj = obj[pathValue[i]] as Record<string, any>
|
||||
}
|
||||
|
||||
obj[pathValue[i]] = value
|
||||
if (pathValue[i] !== "__proto__" && pathValue[i] !== "constructor") {
|
||||
obj[pathValue[i]] = value
|
||||
}
|
||||
}
|
||||
|
||||
// Function to merge overlapping regions
|
||||
|
||||
Reference in New Issue
Block a user