Skip to content

fix: encrypt broadcast lists #6781

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: encrypt broadcast lists
it was all the time questionable if not encrypting broadcast lists
rules the issue that recipients may know each other cryptographically.

however, meanwhile with chatmail, unncrypted broadcasts are no longer possible,
and we actively broke workflows eg. from this teacher:
https://support.delta.chat/t/broadcast-funktioniert-nach-update-nicht-meht/3694

this basically reverts commit
7e5907d
which was that time added last-minute and without lots discussions :)

let the students get their homework again :)
  • Loading branch information
r10s committed Apr 7, 2025
commit 29269e462cced814491a8d08953e06d9ff3002a7
2 changes: 1 addition & 1 deletion src/chat/chat_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2552,7 +2552,7 @@ async fn test_broadcast() -> Result<()> {
let msg = bob.recv_msg(&sent_msg).await;
assert_eq!(msg.get_text(), "ola!");
assert_eq!(msg.subject, "Broadcast list");
assert!(!msg.get_showpadlock()); // avoid leaking recipients in encryption data
assert!(msg.get_showpadlock());
let chat = Chat::load_from_db(&bob, msg.chat_id).await?;
assert_eq!(chat.typ, Chattype::Mailinglist);
assert_ne!(chat.id, chat_bob.id);
Expand Down
10 changes: 4 additions & 6 deletions src/mimefactory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,12 +415,10 @@ impl MimeFactory {

fn should_force_plaintext(&self) -> bool {
match &self.loaded {
Loaded::Message { chat, msg } => {
msg.param
.get_bool(Param::ForcePlaintext)
.unwrap_or_default()
|| chat.typ == Chattype::Broadcast
}
Loaded::Message { msg, .. } => msg
.param
.get_bool(Param::ForcePlaintext)
.unwrap_or_default(),
Loaded::Mdn { .. } => false,
}
}
Expand Down
Loading