From d8a7a178c240c9c473e78942f00db321c38e1bac Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 15 Oct 2020 14:10:35 +0200 Subject: [PATCH] skip check for Chat-Verified on normal messages this would exclude non-deltas from protected-chats (where they could participate in verified-groups in the past) and makes migration a bit harder when using a fuzzy multi-device-setup. however, the test still takes place when a group is created or protection is enabled/disabled. --- src/dc_receive_imf.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/dc_receive_imf.rs b/src/dc_receive_imf.rs index f10acf939..a03bd48b9 100644 --- a/src/dc_receive_imf.rs +++ b/src/dc_receive_imf.rs @@ -1669,10 +1669,16 @@ async fn check_verified_properties( ensure!(mimeparser.was_encrypted(), "This message is not encrypted."); - ensure!( - mimeparser.get(HeaderDef::ChatVerified).is_some(), - "Sender did not mark the message as protected." - ); + if mimeparser.get(HeaderDef::ChatVerified).is_none() { + // we do not fail here currently, this would exclude (a) non-deltas + // and (b) deltas with different protection views across multiple devices. + // for group creation or protection enabled/disabled, however, Chat-Verified is respected. + warn!( + context, + "{} did not mark message as protected.", + contact.get_addr() + ); + } // ensure, the contact is verified // and the message is signed with a verified key of the sender.