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.
This commit is contained in:
B. Petersen
2020-10-15 14:10:35 +02:00
parent 18e9073bfe
commit d8a7a178c2

View File

@@ -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.