mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 01:11:23 +00:00
fix(security): harden account-key handling against prototype pollution
This commit is contained in:
5
src/infra/prototype-keys.ts
Normal file
5
src/infra/prototype-keys.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
const BLOCKED_OBJECT_KEYS = new Set(["__proto__", "prototype", "constructor"]);
|
||||
|
||||
export function isBlockedObjectKey(key: string): boolean {
|
||||
return BLOCKED_OBJECT_KEYS.has(key);
|
||||
}
|
||||
Reference in New Issue
Block a user