Check PDU formats
This commit is contained in:
@@ -68,6 +68,8 @@ pub(super) async fn handle_outlier_pdu(
|
||||
|
||||
let room_rules = room_version::rules(room_version)?;
|
||||
|
||||
state_res::check_pdu_format(&pdu_json, &room_rules.event_format)?;
|
||||
|
||||
// Now that we have checked the signature and hashes we can make mutations and
|
||||
// convert to our PduEvent type.
|
||||
let event = from_incoming_federation(room_id, event_id, &mut pdu_json, &room_rules)?;
|
||||
|
||||
@@ -52,6 +52,8 @@ pub(super) async fn upgrade_outlier_to_timeline_pdu(
|
||||
let timer = Instant::now();
|
||||
let room_rules = room_version::rules(room_version)?;
|
||||
|
||||
state_res::check_pdu_format(&val, &room_rules.event_format)?;
|
||||
|
||||
// 10. Fetch missing state and auth chain events by calling /state_ids at
|
||||
// backwards extremities doing all the checks in this list starting at 1.
|
||||
// These are not timeline events.
|
||||
|
||||
Reference in New Issue
Block a user