ShowHiddenThings: fix discovery keyword filter bypass

This commit is contained in:
Vendicated 2024-09-20 02:03:42 +02:00
parent 755e869db7
commit f7587d9b2e
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18

View file

@ -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 } })"
}
}
],