From f7587d9b2eb12ddb0e0a0020d69f26a105335cf6 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Fri, 20 Sep 2024 02:03:42 +0200 Subject: [PATCH] ShowHiddenThings: fix discovery keyword filter bypass --- src/plugins/showHiddenThings/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/showHiddenThings/index.ts b/src/plugins/showHiddenThings/index.ts index 9ffaa7e14..847dcd327 100644 --- a/src/plugins/showHiddenThings/index.ts +++ b/src/plugins/showHiddenThings/index.ts @@ -112,12 +112,12 @@ export default definePlugin({ }, // patch request that queries if term is allowed { - find: ".GUILD_DISCOVERY_VALID_TERM", + find: ".GUILD_DISCOVERY_VALID_TERM,query:", predicate: () => settings.store.disableDisallowedDiscoveryFilters, all: true, replacement: { - match: /\i\.\i\.get\(\{url:\i\.\i\.GUILD_DISCOVERY_VALID_TERM,query:\{term:\i\},oldFormErrors:!0\}\);/g, - replace: "Promise.resolve({ body: { valid: true } });" + match: /\i\.\i\.get\(\{url:\i\.\i\.GUILD_DISCOVERY_VALID_TERM,query:\{term:\i\},oldFormErrors:!0\}\)/g, + replace: "Promise.resolve({ body: { valid: true } })" } } ],