mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 12:56:30 +03:00
Do not accept protected From headers
Signatures are checked for unprotected From, so it should not be modified afterwards.
This commit is contained in:
committed by
link2xt
parent
a4ca9f738b
commit
b23fe6d976
@@ -155,11 +155,16 @@ impl MimeMessage {
|
|||||||
|
|
||||||
// let known protected headers from the decrypted
|
// let known protected headers from the decrypted
|
||||||
// part override the unencrypted top-level
|
// part override the unencrypted top-level
|
||||||
|
|
||||||
|
// Signature was checked for original From, so we
|
||||||
|
// do not allow overriding it.
|
||||||
|
let mut throwaway_from = from.clone();
|
||||||
|
|
||||||
MimeMessage::merge_headers(
|
MimeMessage::merge_headers(
|
||||||
context,
|
context,
|
||||||
&mut headers,
|
&mut headers,
|
||||||
&mut recipients,
|
&mut recipients,
|
||||||
&mut from,
|
&mut throwaway_from,
|
||||||
&mut chat_disposition_notification_to,
|
&mut chat_disposition_notification_to,
|
||||||
&decrypted_mail.headers,
|
&decrypted_mail.headers,
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user