Replace the regular matching method to traversing the prototype element which defined by defineProperty and__ proto__ , and copy it into the ownproperty with the value of undefined, so as to prevent the polluteded element from being found through the prototype during program execution, resulting in security problems
Because the program itself will use defineProperty to define some elements during execution, for example, express will use defineProperty to set properties such as filename,view and cache, so blacklist filtering is adopted for properties defined by defineProperty to prevent affecting normal data
Replace the regular matching method to traversing the prototype element which defined by
defineProperty
and__ proto__
, and copy it into the ownproperty with the value ofundefined
, so as to prevent the polluteded element from being found through the prototype during program execution, resulting in security problemsBecause the program itself will use
defineProperty
to define some elements during execution, for example, express will usedefineProperty
to set properties such asfilename
,view
andcache
, so blacklist filtering is adopted for properties defined bydefineProperty
to prevent affecting normal data