mirror of
https://github.com/chatmail/core.git
synced 2026-04-29 03:16:29 +03:00
fix: never encrypt {vc,vg}-request
Even if 1:1 chat with alice is protected, we should send vc-request unencrypted. This happens if Alice changed the key and QR-code Bob scans contains fingerprint that is different from the verified fingerprint. Sending vc-request encrypted to the old key does not help because Alice is not able to decrypt it in this case.
This commit is contained in:
@@ -338,18 +338,11 @@ impl<'a> MimeFactory<'a> {
|
||||
fn should_force_plaintext(&self) -> bool {
|
||||
match &self.loaded {
|
||||
Loaded::Message { chat } => {
|
||||
if chat.is_protected() {
|
||||
false
|
||||
} else if chat.typ == Chattype::Broadcast {
|
||||
// encryption may disclose recipients;
|
||||
// this is probably a worse issue than not opportunistically (!) encrypting
|
||||
true
|
||||
} else {
|
||||
self.msg
|
||||
.param
|
||||
.get_bool(Param::ForcePlaintext)
|
||||
.unwrap_or_default()
|
||||
}
|
||||
self.msg
|
||||
.param
|
||||
.get_bool(Param::ForcePlaintext)
|
||||
.unwrap_or_default()
|
||||
|| chat.typ == Chattype::Broadcast
|
||||
}
|
||||
Loaded::Mdn { .. } => false,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user