forbid requesting room directories or media of forbidden servers

This commit is contained in:
Jade Ellis 2025-01-18 15:40:43 +00:00
parent 371103fb35
commit 81a797945b
No known key found for this signature in database
GPG key ID: 8705A2A3EBF77BD2
4 changed files with 13 additions and 1 deletions

View file

@ -1324,6 +1324,8 @@ pub struct Config {
/// Vector list of servers that conduwuit will refuse to download remote
/// media from.
///
/// This is in addition to `forbidden_remote_server_names`.
///
/// default: []
#[serde(default)]
pub prevent_media_downloads_from: HashSet<OwnedServerName>,
@ -1355,6 +1357,8 @@ pub struct Config {
/// room directory requests for. Useful for preventing our users from
/// wandering into bad servers or spaces.
///
/// This is in addition to `forbidden_remote_server_names`.
///
/// default: []
#[serde(default = "HashSet::new")]
pub forbidden_remote_room_directory_server_names: HashSet<OwnedServerName>,