mirror of https://github.com/gorhill/uBlock.git
Fix selfie with invalid data in some circumstances
Reported internally. The issue involves `removeparam` filters with a regex value. When such filter was visited before a selfie was created, this would cause the created selfie to persist a RegExp object, which can't be serialized. This would cause exceptions to be thrown when uBO would be subsequently loaded with the tainted selfie, since uBO would try to execute a plain Object as a RegExp.
This commit is contained in:
parent
9b22961291
commit
8f461072f5
|
@ -1645,7 +1645,7 @@ const FilterModifier = class {
|
|||
filterData[idata+2] = args[2]; // type
|
||||
filterData[idata+3] = filterRefAdd({
|
||||
value: args[3],
|
||||
cache: null,
|
||||
$cache: null,
|
||||
});
|
||||
return idata;
|
||||
}
|
||||
|
@ -1694,11 +1694,11 @@ const FilterModifierResult = class {
|
|||
}
|
||||
|
||||
get cache() {
|
||||
return this.refs.cache;
|
||||
return this.refs.$cache;
|
||||
}
|
||||
|
||||
set cache(a) {
|
||||
this.refs.cache = a;
|
||||
this.refs.$cache = a;
|
||||
}
|
||||
|
||||
logData() {
|
||||
|
@ -3523,7 +3523,7 @@ FilterCompiler.prototype.FILTER_UNSUPPORTED = 2;
|
|||
|
||||
const FilterContainer = function() {
|
||||
this.compilerVersion = '8';
|
||||
this.selfieVersion = '8';
|
||||
this.selfieVersion = '9';
|
||||
|
||||
this.MAX_TOKEN_LENGTH = MAX_TOKEN_LENGTH;
|
||||
this.optimizeTaskId = undefined;
|
||||
|
|
Loading…
Reference in New Issue