Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
timedout
dc574d0f77
chore: Add news fragment 2026-01-06 00:07:47 +00:00
timedout
3992071980
fix: Automatically remove corrupted appservice registrations 2026-01-06 00:07:47 +00:00
2 changed files with 5 additions and 1 deletions

1
changelog.d/1265.bugfix Normal file
View file

@ -0,0 +1 @@
Fixed corrupted appservice registrations causing the server to enter a crash loop. Contributed by @nex.

View file

@ -272,7 +272,10 @@ impl Service {
.get(id) .get(id)
.await .await
.and_then(|ref bytes| serde_saphyr::from_slice(bytes).map_err(Into::into)) .and_then(|ref bytes| serde_saphyr::from_slice(bytes).map_err(Into::into))
.map_err(|e| err!(Database("Invalid appservice {id:?} registration: {e:?}"))) .map_err(|e| {
self.db.id_appserviceregistrations.remove(id);
err!(Database("Invalid appservice {id:?} registration: {e:?}. Removed."))
})
} }
pub fn read(&self) -> impl Future<Output = RwLockReadGuard<'_, Registrations>> + Send { pub fn read(&self) -> impl Future<Output = RwLockReadGuard<'_, Registrations>> + Send {