mirror of
https://github.com/chatmail/core.git
synced 2026-10-01 18:50:39 +03:00
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 https://github.com/chatmail/core/pull/2707/commits/7e5907daf2cec64769440a8a57aeb5fc479e4dd4 which was that time added last-minute and without lots discussions :) let the students get their homework again :)
This commit is contained in:
@@ -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);
|
||||
|
||||
+4
-6
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user