Skip to content

Commit aca3437

Browse files
committed
fix: add padlock to empty part if the whole message is empty
parse_mime_recursive() skips empty text parts, so there may be no parts as the result of parsing. In this case an empty part is added. However, because it is added with parts.push() rather than add_single_part(), it is added without a padlock even if the message is encrypted. `do_add_single_part()` adds padlock (GuaranteeE2EE param) and should be used to add parts instead.
1 parent 1edd704 commit aca3437

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mimeparser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ impl MimeMessage {
694694
}
695695
}
696696

697-
self.parts.push(part);
697+
self.do_add_single_part(part);
698698
}
699699

700700
if self.headers.contains_key("auto-submitted") {

0 commit comments

Comments
 (0)