ShowHiddenThings: fix discovery filter bypass (#2626)

Co-authored-by: vee <vendicated@riseup.net>
This commit is contained in:
Lorenzo Rizzotti 2024-06-26 13:03:23 +02:00 committed by GitHub
parent cd205b1386
commit 4008c93069
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -105,6 +105,15 @@ export default definePlugin({
replace: "=[]" replace: "=[]"
} }
}, },
// empty 2nd word filter
{
find: '"pepe","nude"',
predicate: () => settings.store.disableDisallowedDiscoveryFilters,
replacement: {
match: /\?\["pepe",.+?\]/,
replace: "?[]",
},
},
// patch request that queries if term is allowed // patch request that queries if term is allowed
{ {
find: ".GUILD_DISCOVERY_VALID_TERM", find: ".GUILD_DISCOVERY_VALID_TERM",