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:
Raymond Hill 2022-01-11 11:06:11 -05:00
parent 84bd5c1c0c
commit 9795b0fb48
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -1553,7 +1553,7 @@ const FilterModifier = class {
filterData[idata+2] = args[2]; // type
filterData[idata+3] = filterRefAdd({
value: args[3],
cache: null,
$cache: null,
});
return idata;
}
@ -1602,11 +1602,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() {