Compare commits

...

1 Commits

Author SHA1 Message Date
link2xt
6a128cf04a 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).
2026-08-16 10:45:33 +00:00
2 changed files with 9 additions and 11 deletions

View File

@@ -381,16 +381,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": ");

View File

@@ -1055,7 +1055,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"