fix: SEC50

Reviewed-By: timedout <git@nexy7574.co.uk>
This commit is contained in:
Jade Ellis authored and timedout committed 2026-11-30 17:59:25 +00:00
1 parent 0af4c49657
commit 84082a6515
2 files changed
+16 -4

No files matched your search

+1
View File
@@ -0,0 +1 @@
SEC50 fix. See <https://forgejo.ellis.link/continuwuation/advisories> at a later date for more info. Contributed by @jade.
+15 -4
View File
@@ -139,7 +139,7 @@ impl super::Service {
.await?
.into_iter()
.map(|event_id| (event_id.clone(), auth_chain_map.get(&event_id).unwrap().to_owned()))
.collect::<HashMap<_, _>>();
.collect::<Vec<_>>();
'outer: for (event_id, pdu) in auth_chain_topo {
// If we know the event is rejected OR have it locally, we can skip
@@ -174,9 +174,16 @@ impl super::Service {
)));
};
self.services
.outlier
.add_pdu_outlier(auth_event_id, &auth_event.to_canonical_object());
if self
.services
.pdu_metadata
.is_event_rejected(auth_event_id)
.await
{
self.reject_and_persist(&event_id, &pdu.to_canonical_object());
continue 'outer;
}
let key = auth_event
.kind()
.with_state_key(auth_event.state_key().unwrap());
@@ -201,6 +208,10 @@ impl super::Service {
.await?
{
self.reject_and_persist(&event_id, &pdu.to_canonical_object());
} else {
self.services
.outlier
.add_pdu_outlier(&event_id, &pdu.to_canonical_object());
}
}