perf: Attempt to prevent people joining known busted rooms

This commit is contained in:
timedout
2026-03-07 17:02:08 +00:00
parent 38e93cde3e
commit 511bb8bf55
4 changed files with 60 additions and 4 deletions
+19
View File
@@ -1751,6 +1751,25 @@ pub struct Config {
#[serde(default, with = "serde_regex")]
pub forbidden_alias_names: RegexSet,
/// Allow joining rooms that are known to be broken or have a history of
/// causing issues.
///
/// The rooms that are banned in this way are hardcoded and set by the
/// maintainers, and cannot be configured. This method is a last-resort to
/// prevent people who are just setting up Matrix from joining these huge,
/// old rooms that have been recommended to them, only to watch their
/// server turn into a space heater and have horrific performance issues
/// that are unresolvable due to the completely broken state of the rooms.
///
/// If you enable this option, you acknowledge that joining rooms banned by
/// this feature will likely cause you severe performance issues, and you
/// forgo your right to complain about any slowdowns or inflated resource
/// usage you encounter.
///
/// default: false
#[serde(default)]
pub allow_joining_broken_rooms: bool,
/// List of forbidden username patterns/strings.
///
/// Regex can be used or explicit contains matches can be done by just