fix: avoid panic

next
Timo Kösters 2021-09-01 22:49:16 +02:00
parent 7cd7f1923f
commit 2770ce2cf6
No known key found for this signature in database
GPG Key ID: 24DA7517711A2BA4
3 changed files with 9 additions and 13 deletions

View File

@ -20,16 +20,14 @@ HQ.
#### What is the current status? #### What is the current status?
As of 2021-09-01 Conduit is Beta, meaning you can join and participate in most As of 2021-09-01, Conduit is Beta, meaning you can join and participate in most
Matrix rooms, but not all features are supported and you might run into bugs Matrix rooms, but not all features are supported and you might run into bugs
from time to time. from time to time.
There are still a few important features missing: There are still a few important features missing:
- Database stability (currently you might have to do manual upgrades or even wipe the db for new versions) - E2EE verification over federation
- Edge cases for end-to-end encryption over federation - Outgoing read receipts, typing, presence over federation
- Typing and presence over federation
- Lots of testing
Check out the [Conduit 1.0 Release Milestone](https://gitlab.com/famedly/conduit/-/milestones/3). Check out the [Conduit 1.0 Release Milestone](https://gitlab.com/famedly/conduit/-/milestones/3).

View File

@ -66,7 +66,11 @@ where
let limit = db.globals.max_request_size(); let limit = db.globals.max_request_size();
let mut handle = data.open(ByteUnit::Byte(limit.into())); let mut handle = data.open(ByteUnit::Byte(limit.into()));
let mut body = Vec::new(); let mut body = Vec::new();
handle.read_to_end(&mut body).await.unwrap(); if let Err(_) = handle.read_to_end(&mut body).await {
// Client disconnected
// Missing Token
return Failure((Status::new(582), ()));
}
let mut json_body = serde_json::from_slice::<CanonicalJsonValue>(&body).ok(); let mut json_body = serde_json::from_slice::<CanonicalJsonValue>(&body).ok();

View File

@ -1439,13 +1439,7 @@ async fn upgrade_outlier_to_timeline_pdu(
let fork_states = &fork_states let fork_states = &fork_states
.into_iter() .into_iter()
.map(|map| { .map(|map| map.into_iter().map(|(k, id)| (k, (*id).clone())).collect())
map.into_iter()
.map(|(k, id)| {
(k, (*id).clone())
})
.collect()
})
.collect::<Vec<_>>(); .collect::<Vec<_>>();
state_at_incoming_event = match state_res::StateResolution::resolve( state_at_incoming_event = match state_res::StateResolution::resolve(