From 4008c9306965fcee18715a11c2d7c8d8214b9765 Mon Sep 17 00:00:00 2001 From: Lorenzo Rizzotti Date: Wed, 26 Jun 2024 13:03:23 +0200 Subject: [PATCH] ShowHiddenThings: fix discovery filter bypass (#2626) Co-authored-by: vee --- src/plugins/showHiddenThings/index.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/plugins/showHiddenThings/index.ts b/src/plugins/showHiddenThings/index.ts index 58269b360..b92c16c86 100644 --- a/src/plugins/showHiddenThings/index.ts +++ b/src/plugins/showHiddenThings/index.ts @@ -105,6 +105,15 @@ export default definePlugin({ replace: "=[]" } }, + // empty 2nd word filter + { + find: '"pepe","nude"', + predicate: () => settings.store.disableDisallowedDiscoveryFilters, + replacement: { + match: /\?\["pepe",.+?\]/, + replace: "?[]", + }, + }, // patch request that queries if term is allowed { find: ".GUILD_DISCOVERY_VALID_TERM",