Skip to content

Commit 3ffe332

Browse files
committed
feat: protect the Date header
1 parent e5a3eae commit 3ffe332

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/mimefactory.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,12 @@ impl MimeFactory {
879879
&& !context.get_config_bool(Config::ProtectAutocrypt).await?
880880
{
881881
unprotected_headers.push(header.clone());
882+
} else if is_encrypted && header_name == "date" {
883+
protected_headers.push(header.clone());
884+
unprotected_headers.push((
885+
"Date",
886+
mail_builder::headers::HeaderType::Raw("Thu, 01 Jan 1970 00:00:00 +0000".into()),
887+
));
882888
} else if header_name == "from" {
883889
// Unencrypted securejoin messages should _not_ include the display name:
884890
if is_encrypted || !is_securejoin_message {

0 commit comments

Comments
 (0)