mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7a6acd1c82 | |||
| d260c4fcc2 | |||
| fa15de9764 | |||
| e6c7a4ae60 | |||
| 5bed4ad81d |
+1
-1
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
## Misc
|
## Misc
|
||||||
|
|
||||||
- Improve timeout-related code for federation and URL previews. Contributed by @Jade
|
- Improve timeout-related code for federation and URL previews. Contributed by @Jade (#1278)
|
||||||
|
|
||||||
|
|
||||||
# Continuwuity 0.5.2 (2026-01-09)
|
# Continuwuity 0.5.2 (2026-01-09)
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
The announcement checker will now announce errors it encounters in the first run to the admin room, plus a few other misc improvements. Contributed by @Jade
|
||||||
@@ -6,10 +6,10 @@
|
|||||||
"message": "Welcome to Continuwuity! Important announcements about the project will appear here."
|
"message": "Welcome to Continuwuity! Important announcements about the project will appear here."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 7,
|
"id": 8,
|
||||||
"mention_room": true,
|
"mention_room": false,
|
||||||
"date": "2025-12-30",
|
"date": "2026-01-12",
|
||||||
"message": "Continuwuity v0.5.1 has been released. **The release contains a fix for the critical vulnerability [GHSA-m5p2-vccg-8c9v](https://github.com/continuwuity/continuwuity/security/advisories/GHSA-m5p2-vccg-8c9v) (embargoed) affecting all Conduit-derived servers. Update as soon as possible.**\n\nThis has been *actively exploited* to attempt account takeover and forge events bricking the Continuwuity rooms. The new space is accessible at [Continuwuity (room list)](https://matrix.to/#/!8cR4g-i9ucof69E4JHNg9LbPVkGprHb3SzcrGBDDJgk?via=continuwuity.org&via=starstruck.systems&via=gingershaped.computer)\n"
|
"message": "Hey everyone!\n\nJust letting you know we've released [v0.5.3](https://forgejo.ellis.link/continuwuation/continuwuity/releases/tag/v0.5.3) - this one is a bit of a hotfix for an issue with inviting and allowing others to join rooms.\n\nIf you appreceate the round-the-clock work we've been doing to keep your servers secure over this holiday period, we'd really appreciate your support - you can sponsor individuals on our team using the 'sponsor' button at the top of [our GitHub repository](https://github.com/continuwuity/continuwuity). If you can't do that, even a star helps - spreading the word and advocating for our project helps keep it going.\n\nHave a lovely rest of your year \\\n[Jade \\(she/her\\)](https://matrix.to/#/%40jade%3Aellis.link) \n🩵"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,8 +13,7 @@ use conduwuit::{
|
|||||||
use conduwuit_service::Services;
|
use conduwuit_service::Services;
|
||||||
use futures::{FutureExt, StreamExt, TryStreamExt};
|
use futures::{FutureExt, StreamExt, TryStreamExt};
|
||||||
use ruma::{
|
use ruma::{
|
||||||
CanonicalJsonValue, OwnedEventId, OwnedRoomId, OwnedServerName, OwnedUserId, RoomId,
|
CanonicalJsonValue, OwnedEventId, OwnedRoomId, OwnedUserId, RoomId, ServerName,
|
||||||
ServerName,
|
|
||||||
api::federation::membership::create_join_event,
|
api::federation::membership::create_join_event,
|
||||||
events::{
|
events::{
|
||||||
StateEventType,
|
StateEventType,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use conduwuit::{
|
|||||||
};
|
};
|
||||||
use futures::FutureExt;
|
use futures::FutureExt;
|
||||||
use ruma::{
|
use ruma::{
|
||||||
OwnedServerName, OwnedUserId,
|
OwnedUserId,
|
||||||
RoomVersionId::*,
|
RoomVersionId::*,
|
||||||
api::federation::knock::send_knock,
|
api::federation::knock::send_knock,
|
||||||
events::{
|
events::{
|
||||||
|
|||||||
@@ -18,8 +18,9 @@
|
|||||||
use std::{sync::Arc, time::Duration};
|
use std::{sync::Arc, time::Duration};
|
||||||
|
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use conduwuit::{Result, Server, debug, info, warn};
|
use conduwuit::{Result, Server, debug, error, info, warn};
|
||||||
use database::{Deserialized, Map};
|
use database::{Deserialized, Map};
|
||||||
|
use rand::Rng;
|
||||||
use ruma::events::{Mentions, room::message::RoomMessageEventContent};
|
use ruma::events::{Mentions, room::message::RoomMessageEventContent};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use tokio::{
|
use tokio::{
|
||||||
@@ -86,9 +87,27 @@ impl crate::Service for Service {
|
|||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Run the first check immediately and send errors to admin room
|
||||||
|
if let Err(e) = self.check().await {
|
||||||
|
error!(?e, "Failed to check for announcements on startup");
|
||||||
|
self.services
|
||||||
|
.admin
|
||||||
|
.send_message(RoomMessageEventContent::text_plain(format!(
|
||||||
|
"Failed to check for announcements on startup: {e}"
|
||||||
|
)))
|
||||||
|
.await
|
||||||
|
.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
let first_check_jitter = {
|
||||||
|
let mut rng = rand::thread_rng();
|
||||||
|
let jitter_percent = rng.gen_range(-50.0..=10.0);
|
||||||
|
self.interval.mul_f64(1.0 + jitter_percent / 100.0)
|
||||||
|
};
|
||||||
|
|
||||||
let mut i = interval(self.interval);
|
let mut i = interval(self.interval);
|
||||||
i.set_missed_tick_behavior(MissedTickBehavior::Delay);
|
i.set_missed_tick_behavior(MissedTickBehavior::Delay);
|
||||||
i.reset_after(self.interval);
|
i.reset_after(first_check_jitter);
|
||||||
loop {
|
loop {
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
() = self.interrupt.notified() => break,
|
() = self.interrupt.notified() => break,
|
||||||
|
|||||||
Reference in New Issue
Block a user