From 830d5eaa84481854c21cd9b6935243d2cdb6f4a7 Mon Sep 17 00:00:00 2001 From: Jacob Taylor Date: Thu, 19 Nov 2026 21:34:57 -0800 Subject: [PATCH] chore: No Auth Media, No UnAuth Profiles --- conduwuit-example.toml | 12 ------------ src/api/client/profile.rs | 4 ++-- src/core/config/mod.rs | 14 +------------- 3 files changed, 3 insertions(+), 27 deletions(-) diff --git a/conduwuit-example.toml b/conduwuit-example.toml index e860a971c..04c1d0a31 100644 --- a/conduwuit-example.toml +++ b/conduwuit-example.toml @@ -813,18 +813,6 @@ # env: CONTINUWUITY_FORGET_FORCED_UPON_LEAVE #forget_forced_upon_leave = false -# Set this to true to require authentication when looking up user profiles -# through this server. -# -# By default this is false, allowing tools such as matrix.to to access -# profiles of users on this server and on other servers. -# Setting this to true will block those tools, and may block automated -# crawlers from scraping users' profiles, although it will not block -# other homeservers from accessing users' profiles. -# -# env: CONTINUWUITY_REQUIRE_AUTH_FOR_PROFILE_REQUESTS -#require_auth_for_profile_requests = false - # Set this to true to require authentication to create a rendezvous # session. Rendezvous sessions are used for QR code login. # diff --git a/src/api/client/profile.rs b/src/api/client/profile.rs index 4f2d6bedc..2ccae1b3a 100644 --- a/src/api/client/profile.rs +++ b/src/api/client/profile.rs @@ -29,7 +29,7 @@ pub(crate) async fn get_profile_route( State(services): State, body: Ruma, ) -> Result { - if services.config.require_auth_for_profile_requests && body.identity.is_none() { + if body.identity.is_none() { return Err!(Request(Unauthorized( "This server requires authentication to access user profiles." ))); @@ -46,7 +46,7 @@ pub(crate) async fn get_profile_field_route( State(services): State, body: Ruma, ) -> Result { - if services.config.require_auth_for_profile_requests && body.identity.is_none() { + if body.identity.is_none() { return Err!(Request(Unauthorized( "This server requires authentication to access user profiles." ))); diff --git a/src/core/config/mod.rs b/src/core/config/mod.rs index b012e01fb..bf52d5e0b 100644 --- a/src/core/config/mod.rs +++ b/src/core/config/mod.rs @@ -920,19 +920,6 @@ pub struct Config { #[serde(default)] pub forget_forced_upon_leave: bool, - /// Set this to true to require authentication when looking up user profiles - /// through this server. - /// - /// By default this is false, allowing tools such as matrix.to to access - /// profiles of users on this server and on other servers. - /// Setting this to true will block those tools, and may block automated - /// crawlers from scraping users' profiles, although it will not block - /// other homeservers from accessing users' profiles. - /// - /// default: false - #[serde(default)] - pub require_auth_for_profile_requests: bool, - /// Set this to true to require authentication to create a rendezvous /// session. Rendezvous sessions are used for QR code login. /// @@ -3002,6 +2989,7 @@ const DEPRECATED_KEYS: &[&str] = &[ "max_concurrent_requests", "otlp_protocol", "request_ip_source", + "require_auth_for_profile_requests", "roomid_spacehierarchy_cache_capacity", "unredacted_content_max_age_secs", "well_known_client",