mirror of
https://github.com/chatmail/core.git
synced 2026-05-13 20:06:30 +03:00
Securejoin: Fix adding and handling Autocrypt-Gossip headers (#3836)
- If bcc_self is set, gossip headers must be added despite of the number of group members. - If another device observes Secure-Join, instead of looking for Secure-Join-Fingerprint in "vg-member-added"/"vc-contact-confirm" messages it must use keys from Autocrypt-Gossip headers as described in the Countermitm doc (https://countermitm.readthedocs.io/en/latest/new.html#joining-a-verified-group-secure-join).
This commit is contained in:
@@ -689,7 +689,9 @@ impl<'a> MimeFactory<'a> {
|
||||
.fold(message, |message, header| message.header(header));
|
||||
|
||||
// Add gossip headers in chats with multiple recipients
|
||||
if peerstates.len() > 1 && self.should_do_gossip(context).await? {
|
||||
if (peerstates.len() > 1 || context.get_config_bool(Config::BccSelf).await?)
|
||||
&& self.should_do_gossip(context).await?
|
||||
{
|
||||
for peerstate in peerstates.iter().filter_map(|(state, _)| state.as_ref()) {
|
||||
if peerstate.peek_key(min_verified).is_some() {
|
||||
if let Some(header) = peerstate.render_gossip_header(min_verified) {
|
||||
|
||||
Reference in New Issue
Block a user