From e81e70937f5b6f8f98bdd8e6f71af030486efab8 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sun, 29 Sep 2024 10:51:56 -0400 Subject: [PATCH] Add ability to decode base64 in `urlskip=` Related case: https://github.com/uBlockOrigin/uAssets/issues/25467 New step: `-base64` Purpose: to decode base64-encoded output of previous step --- src/js/static-net-filtering.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js index e5e9017d2..f5b184175 100644 --- a/src/js/static-net-filtering.js +++ b/src/js/static-net-filtering.js @@ -5441,6 +5441,11 @@ function urlSkip(urlin, steps) { urlin = urlout = `https://${s}`; continue; } + // Decode base64 + if ( step === '-base64' ) { + urlin = urlout = self.atob(urlin); + continue; + } // Unknown directive return; }