From 7b291c14169bd5ebd70cb6ef723172f5c9fae7f5 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Sun, 6 Dec 2020 01:34:59 +0100 Subject: [PATCH] use correct key when sending filenames adding an asterisk to the filename key REQUIRES two apostrope-delimiters in the value as of charset'lang'name, see rfc2231 as we do use the value this way, we MUST not add the asterisk. things worked correctly in the past as consuming MUAs are pretty graceful. i assume the error comes from the c to rust conversion - core-c did add the asterisk, however also did the apostrope-encoding. core-rust leaves the asterisk but changes encoding. --- src/mimefactory.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mimefactory.rs b/src/mimefactory.rs index 9e18696c7..e653a7511 100644 --- a/src/mimefactory.rs +++ b/src/mimefactory.rs @@ -1180,7 +1180,7 @@ async fn build_body_file( // run into other problems ... let cd_value = if needs_encoding(&filename_to_send) { format!( - "attachment; filename*=\"{}\"", + "attachment; filename=\"{}\"", encode_words(&filename_to_send) ) } else {