Skip to content

Commit

Permalink
33250: when deleting all attachments, fix displaying information abou…
Browse files Browse the repository at this point in the history
…t all deleted attachments
  • Loading branch information
derjoachim committed Oct 21, 2024
1 parent 001607a commit baf4d52
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
- E-mail: Set internal date on IMAP APPEND command's. This way the internal date when moving or copying messages to another account is preserved
- Core: added endpoint api/up.php that checks the database connection and filesystem disks for uptime monitoring.
- Core / e-mail: Fixed problem where typing ü would insert a , in the mail composer on german QWERTZ layout
- E-mail: Fix 'delete all attachments' bug.

14-10-2024: 6.8.77
- Timeregistration: Fixed time dialog tracking time starting at midnight
Expand Down
10 changes: 9 additions & 1 deletion www/modules/email/model/ImapMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -810,9 +810,17 @@ public function deleteAttachments(): bool
}
while ($att = array_shift($atts)) {
if ($att->disposition == 'attachment' || empty($att->content_id)) {
// Do not delete S/MINE certificate
if ($att->mime === "application/x-pkcs7-signature") {
continue;
}

$str = $this->addPartString($att, $bIsPlain);
$a = Attachment::fromString($str, "", ($bIsPlain ? 'text/plain' : 'text/html'), Attachment::ENCODING_7BIT);
$a->setId("");

// Fool PHPMailer into attaching all attachments. If the IDs are identical, later attachments are not
// being attached inline.
$a->setId(random_bytes(12));
$msg->embed($a);
}
}
Expand Down

0 comments on commit baf4d52

Please sign in to comment.