feat: do not copy Chat-Version header into unprotected headers

spec.md already documents Header Confidentiality Policy
that hides Chat-Version header in encrypted messages,
but so far we have copied the header into unprotected headers for compatibility.

Since 2.45.0 prefetch does not look at the unprotected Chat-Version
do decide if the message should be downloaded
(change b94792706a)
and since 2.50 show_emails setting which controlled
whether only "chat messages" are processed
is removed (change 63596a4940).
This commit is contained in:
link2xt
2026-10-20 10:58:50 +00:00
committed by l
parent 38749e0e9c
commit 7a129352c8
2 changed files with 9 additions and 11 deletions
+9 -10
View File
@@ -347,16 +347,15 @@ pub(crate) fn render_queued_mail(
// <https://www.rfc-editor.org/rfc/rfc9787.html#structural-header-fields>.
continue;
}
let header_value =
if header_name == "chat-version" || header_name == "chat-is-post-message" {
parsed_header.get_value_raw()
} else if header_name == "subject" {
&b"[...]"[..]
} else if header_name == "to" {
&b"\"hidden-recipients\": ;"[..]
} else {
continue;
};
let header_value = if header_name == "chat-is-post-message" {
parsed_header.get_value_raw()
} else if header_name == "subject" {
&b"[...]"[..]
} else if header_name == "to" {
&b"\"hidden-recipients\": ;"[..]
} else {
continue;
};
outer_headers.extend(original_header_name.as_bytes());
outer_headers.extend(b": ");
-1
View File
@@ -1058,7 +1058,6 @@ Message-ID: <MESSAGE_ID@localhost>
MIME-Version: 1.0
To: "hidden-recipients": ;
Subject: [...]
Chat-Version: 1.0
Content-Type: multipart/encrypted; protocol="application/pgp-encrypted";
boundary="BOUNDARY"