Re-enable DKIM-checks (#3935)

Re-enable keychange-denying when the From address is wrong

Reverts #3728
Closes #3735
Reopens #3700
This commit is contained in:
Hocuri
2023-02-07 17:07:43 +01:00
committed by GitHub
parent cd293e6f49
commit fa70d8da09
3 changed files with 8 additions and 13 deletions

View File

@@ -325,8 +325,7 @@ impl MimeMessage {
if let (Some(peerstate), Ok(mail)) = (&mut decryption_info.peerstate, mail) {
if message_time > peerstate.last_seen_autocrypt
&& mail.ctype.mimetype != "multipart/report"
// Disallowing keychanges is disabled for now:
// && decryption_info.dkim_results.allow_keychange
&& decryption_info.dkim_results.allow_keychange
{
peerstate.degrade_encryption(message_time);
}
@@ -397,12 +396,11 @@ impl MimeMessage {
parser.heuristically_parse_ndn(context).await;
parser.parse_headers(context).await?;
// Disallowing keychanges is disabled for now
// if !decryption_info.dkim_results.allow_keychange {
// for part in parser.parts.iter_mut() {
// part.error = Some("Seems like DKIM failed, this either is an attack or (more likely) a bug in Authentication-Results checking. Please tell us about this at https://support.delta.chat.".to_string());
// }
// }
if !parser.decryption_info.dkim_results.allow_keychange {
for part in parser.parts.iter_mut() {
part.error = Some("Seems like DKIM failed, this either is an attack or (more likely) a bug in Authentication-Results checking. Please tell us about this at https://support.delta.chat.".to_string());
}
}
if parser.is_mime_modified {
parser.decoded_data = mail_raw;