mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-21 07:57:34 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9190219bd0 |
No files matched your search
@@ -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
|
||||
|
||||
@@ -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."
|
||||
)));
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user