chatmail / chatmail/core

Simultaneous addition of members results in missing keys

Open
#6,791 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
929
Forks
143
Avg merge
1d 20h
Merged PRs (30d)
53

Description

Let's say A and B are part of the group. Simultaneously, e.g. while being offline, A adds C and B adds D. Now the group consists of A, B, C and D, but C and D don't see each other yet because "member added" message for C does not contain D and vice versa. Then let's say A writes something to the group. Both C and D will learn about the full group member list from this message, but A will not gossip the keys for C and D, so C and D will now see each other as a member without a key.

This is the current state because we track a single gossip timestamp for each chat and will gossip the keys only two days later or if someone is added. With https://github.com/chatmail/core/pull/6787 we will track the gossip per chat and fingerprint of the gossiped key, but will not track who have seen which keys.

One way to fix this case would be to track the gossip of each key per recipient. Since A did not see the key of C gossiped to D and key of D gossiped to C, A should gossip the keys for C and D.

Another option is to not fix this problem as it happens rarely, but allow sending key requests, so C will request the key of D and D will request the key of C when they send a message to the chat.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.