File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
packages/controller-utils/src Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -16,18 +16,14 @@ import { MAX_SAFE_CHAIN_ID } from './constants';
16
16
17
17
const TIMEOUT_ERROR = new Error ( 'timeout' ) ;
18
18
19
- const PROTOTYPE_POLLUTION_BLOCKLIST = [
20
- '__proto__' ,
21
- 'constructor' ,
22
- 'defineProperty' ,
23
- ] as const ;
19
+ const PROTOTYPE_POLLUTION_BLOCKLIST = [ '__proto__' , 'constructor' ] as const ;
24
20
25
21
/**
26
- * Checks whether a dynamic string used as an object key is a dangerous string
27
- * that makes the object vulnerable to a prototype pollution attack.
22
+ * Checks whether a dynamic string used as an object property key
23
+ * could be used in a prototype pollution attack.
28
24
*
29
25
* @param key - The dynamic key to check for safety.
30
- * @returns Whether the given dyanmic key is safe
26
+ * @returns Whether the given dyanmic key is safe to use.
31
27
*/
32
28
export function isSafeDynamicKey ( key : string ) : boolean {
33
29
return PROTOTYPE_POLLUTION_BLOCKLIST . every ( ( badInput ) => key !== badInput ) ;
You can’t perform that action at this time.
0 commit comments