Disable buggy auth_events check

This commit is contained in:
Timo Kösters 2020-09-13 22:19:48 +02:00 committed by Devin Ragotzy
parent ad4fb6420a
commit 33232f0a63

View File

@ -132,6 +132,7 @@ pub fn auth_check(
return Ok(true); return Ok(true);
} }
/*
// 2. Reject if auth_events // 2. Reject if auth_events
// a. auth_events cannot have duplicate keys since it's a BTree // a. auth_events cannot have duplicate keys since it's a BTree
// b. All entries are valid auth events according to spec // b. All entries are valid auth events according to spec
@ -141,6 +142,9 @@ pub fn auth_check(
incoming_event.state_key(), incoming_event.state_key(),
incoming_event.content().clone(), incoming_event.content().clone(),
); );
dbg!(&expected_auth);
for ev_key in auth_events.keys() { for ev_key in auth_events.keys() {
// (b) // (b)
if !expected_auth.contains(ev_key) { if !expected_auth.contains(ev_key) {
@ -148,6 +152,7 @@ pub fn auth_check(
return Ok(false); return Ok(false);
} }
} }
*/
// 3. If event does not have m.room.create in auth_events reject // 3. If event does not have m.room.create in auth_events reject
if auth_events if auth_events