File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed
address-book-controller/src Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ export class AddressBookController extends BaseControllerV1<
110
110
delete ( chainId : Hex , address : string ) {
111
111
address = toChecksumHexAddress ( address ) ;
112
112
if (
113
+ [ chainId , address ] . includes ( '__proto__' ) ||
113
114
! isValidHexAddress ( address ) ||
114
115
! this . state . addressBook [ chainId ] ||
115
116
! this . state . addressBook [ chainId ] [ address ]
Original file line number Diff line number Diff line change @@ -194,6 +194,8 @@ export class EnsController extends BaseController<
194
194
delete ( chainId : Hex , ensName : string ) : boolean {
195
195
const normalizedEnsName = normalizeEnsName ( ensName ) ;
196
196
if (
197
+ // @ts -expect-error suppressing to perform runtime check
198
+ chainId === '__proto__' ||
197
199
! normalizedEnsName ||
198
200
! this . state . ensEntries [ chainId ] ||
199
201
! this . state . ensEntries [ chainId ] [ normalizedEnsName ]
Original file line number Diff line number Diff line change @@ -441,6 +441,13 @@ export class NameController extends BaseController<
441
441
const normalizedValue = this . #normalizeValue( value , type ) ;
442
442
const normalizedVariation = this . #normalizeVariation( variationKey , type ) ;
443
443
444
+ if (
445
+ normalizedValue === '__proto__' ||
446
+ normalizedVariation === '__proto__'
447
+ ) {
448
+ return ;
449
+ }
450
+
444
451
this . update ( ( state ) => {
445
452
const typeEntries = state . names [ type ] || { } ;
446
453
state . names [ type ] = typeEntries ;
You can’t perform that action at this time.
0 commit comments