mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-23 17:07:32 +00:00
chore: No Auth Media, No UnAuth Profiles
This commit is contained in:
1 parent
b36a368f75
commit
830d5eaa84
3 files changed
+3
-27
No files matched your search
@@ -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.
|
||||
#
|
||||
|
||||
@@ -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
-13
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user