mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 69a08ffbf6 | |||
| 123aa2456c | |||
| c3f6c73ac4 | |||
| 1730cc9ff3 | |||
| cb9786466b | |||
| 18d2662b01 |
@@ -0,0 +1 @@
|
|||||||
|
Removed the `allow_public_room_directory_without_auth` config option. Contributed by @0xnim.
|
||||||
@@ -9,7 +9,6 @@ address = "0.0.0.0"
|
|||||||
allow_device_name_federation = true
|
allow_device_name_federation = true
|
||||||
allow_guest_registration = true
|
allow_guest_registration = true
|
||||||
allow_public_room_directory_over_federation = true
|
allow_public_room_directory_over_federation = true
|
||||||
allow_public_room_directory_without_auth = true
|
|
||||||
allow_registration = true
|
allow_registration = true
|
||||||
database_path = "/database"
|
database_path = "/database"
|
||||||
log = "trace,h2=debug,hyper=debug"
|
log = "trace,h2=debug,hyper=debug"
|
||||||
|
|||||||
@@ -546,12 +546,6 @@
|
|||||||
#
|
#
|
||||||
#allow_public_room_directory_over_federation = false
|
#allow_public_room_directory_over_federation = false
|
||||||
|
|
||||||
# Set this to true to allow your server's public room directory to be
|
|
||||||
# queried without client authentication (access token) through the Client
|
|
||||||
# APIs. Set this to false to protect against /publicRooms spiders.
|
|
||||||
#
|
|
||||||
#allow_public_room_directory_without_auth = false
|
|
||||||
|
|
||||||
# Allow guests/unauthenticated users to access TURN credentials.
|
# Allow guests/unauthenticated users to access TURN credentials.
|
||||||
#
|
#
|
||||||
# This is the equivalent of Synapse's `turn_allow_guests` config option.
|
# This is the equivalent of Synapse's `turn_allow_guests` config option.
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ pub(super) async fn load_joined_room(
|
|||||||
and `join*` functions are used to perform steps in parallel which do not depend on each other.
|
and `join*` functions are used to perform steps in parallel which do not depend on each other.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
let insert_lock = services.rooms.timeline.mutex_insert.lock(room_id).await;
|
||||||
|
drop(insert_lock);
|
||||||
let (
|
let (
|
||||||
account_data,
|
account_data,
|
||||||
ephemeral,
|
ephemeral,
|
||||||
@@ -270,7 +272,7 @@ async fn build_state_and_timeline(
|
|||||||
// joined since the last sync, that being the syncing user's join event. if
|
// joined since the last sync, that being the syncing user's join event. if
|
||||||
// it's empty something is wrong.
|
// it's empty something is wrong.
|
||||||
if joined_since_last_sync && timeline.pdus.is_empty() {
|
if joined_since_last_sync && timeline.pdus.is_empty() {
|
||||||
warn!("timeline for newly joined room is empty");
|
debug_warn!("timeline for newly joined room is empty");
|
||||||
}
|
}
|
||||||
|
|
||||||
let (summary, device_list_updates) = try_join(
|
let (summary, device_list_updates) = try_join(
|
||||||
|
|||||||
+11
-17
@@ -67,23 +67,17 @@ pub(super) async fn auth(
|
|||||||
if metadata.authentication == AuthScheme::None {
|
if metadata.authentication == AuthScheme::None {
|
||||||
match metadata {
|
match metadata {
|
||||||
| &get_public_rooms::v3::Request::METADATA => {
|
| &get_public_rooms::v3::Request::METADATA => {
|
||||||
if !services
|
match token {
|
||||||
.server
|
| Token::Appservice(_) | Token::User(_) => {
|
||||||
.config
|
// we should have validated the token above
|
||||||
.allow_public_room_directory_without_auth
|
// already
|
||||||
{
|
},
|
||||||
match token {
|
| Token::None | Token::Invalid => {
|
||||||
| Token::Appservice(_) | Token::User(_) => {
|
return Err(Error::BadRequest(
|
||||||
// we should have validated the token above
|
ErrorKind::MissingToken,
|
||||||
// already
|
"Missing or invalid access token.",
|
||||||
},
|
));
|
||||||
| Token::None | Token::Invalid => {
|
},
|
||||||
return Err(Error::BadRequest(
|
|
||||||
ErrorKind::MissingToken,
|
|
||||||
"Missing or invalid access token.",
|
|
||||||
));
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
| &get_profile::v3::Request::METADATA
|
| &get_profile::v3::Request::METADATA
|
||||||
|
|||||||
@@ -678,12 +678,6 @@ pub struct Config {
|
|||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub allow_public_room_directory_over_federation: bool,
|
pub allow_public_room_directory_over_federation: bool,
|
||||||
|
|
||||||
/// Set this to true to allow your server's public room directory to be
|
|
||||||
/// queried without client authentication (access token) through the Client
|
|
||||||
/// APIs. Set this to false to protect against /publicRooms spiders.
|
|
||||||
#[serde(default)]
|
|
||||||
pub allow_public_room_directory_without_auth: bool,
|
|
||||||
|
|
||||||
/// Allow guests/unauthenticated users to access TURN credentials.
|
/// Allow guests/unauthenticated users to access TURN credentials.
|
||||||
///
|
///
|
||||||
/// This is the equivalent of Synapse's `turn_allow_guests` config option.
|
/// This is the equivalent of Synapse's `turn_allow_guests` config option.
|
||||||
|
|||||||
Reference in New Issue
Block a user