From 3ca6d7776b795c3923299492f5991896dbe7fce8 Mon Sep 17 00:00:00 2001 From: Benjamin Lee Date: Mon, 17 Jun 2024 20:18:30 -0700 Subject: [PATCH] better log message for auth chain room id mismatch The previous "Evil event in db" message does not indicate what's going on, and does not help identify *which* events are causing the problem. --- src/service/rooms/auth_chain.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/service/rooms/auth_chain.rs b/src/service/rooms/auth_chain.rs index 4a551953..98d19662 100644 --- a/src/service/rooms/auth_chain.rs +++ b/src/service/rooms/auth_chain.rs @@ -154,9 +154,10 @@ impl Service { match services().rooms.timeline.get_pdu(&event_id) { Ok(Some(pdu)) => { if pdu.room_id != room_id { + warn!(bad_room_id = %pdu.room_id, "Event referenced in auth chain has incorrect room id"); return Err(Error::BadRequest( ErrorKind::forbidden(), - "Evil event in db", + "Event has incorrect room id", )); } for auth_event in &pdu.auth_events {