From 9795b0fb484f2d12d8d11ba102a206e012862f86 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 11 Jan 2022 11:06:11 -0500 Subject: [PATCH] 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. --- src/js/static-net-filtering.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js index adba8e6a5..d7a9657fa 100644 --- a/src/js/static-net-filtering.js +++ b/src/js/static-net-filtering.js @@ -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() {