Compare commits

...
Author SHA1 Message Date
Jacob Taylor 9190219bd0 chore: No Auth Media, No UnAuth Profiles 2026-11-19 21:34:57 -08:00
3 changed files with 3 additions and 19 deletions

No files matched your search

-9
View File
@@ -812,15 +812,6 @@
# env: CONTINUWUITY_FORGET_FORCED_UPON_LEAVE
#forget_forced_upon_leave = false
# Set this to true to require authentication on the normally
# unauthenticated profile retrieval endpoints (GET)
# "/_matrix/client/v3/profile/{userId}".
#
# This can prevent profile scraping.
#
# env: CONTINUWUITY_REQUIRE_AUTH_FOR_PROFILE_REQUESTS
#require_auth_for_profile_requests = false
# Set this to true to allow your server's public room directory to be
# federated. Set this to false to protect against /publicRooms spiders,
# but will forbid external users from viewing your server's public room
+2 -2
View File
@@ -29,7 +29,7 @@ pub(crate) async fn get_profile_route(
State(services): State<crate::State>,
body: Ruma<get_profile::v3::Request>,
) -> Result<get_profile::v3::Response> {
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<crate::State>,
body: Ruma<get_profile_field::v3::Request>,
) -> Result<get_profile_field::v3::Response> {
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."
)));
+1 -8
View File
@@ -919,14 +919,6 @@ pub struct Config {
#[serde(default)]
pub forget_forced_upon_leave: bool,
/// Set this to true to require authentication on the normally
/// unauthenticated profile retrieval endpoints (GET)
/// "/_matrix/client/v3/profile/{userId}".
///
/// This can prevent profile scraping.
#[serde(default)]
pub require_auth_for_profile_requests: bool,
/// Set this to true to allow your server's public room directory to be
/// federated. Set this to false to protect against /publicRooms spiders,
/// but will forbid external users from viewing your server's public room
@@ -2977,6 +2969,7 @@ const DEPRECATED_KEYS: &[&str] = &[
"conduit_cache_capacity_modifier",
"max_concurrent_requests",
"otlp_protocol",
"require_auth_for_profile_requests",
"roomid_spacehierarchy_cache_capacity",
"well_known_client",
"well_known_server",