Skip to content

Commit

Permalink
Exclude pgp signtures as attachments
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Kesselberg <[email protected]>
  • Loading branch information
kesselb committed Oct 1, 2021
1 parent 65ea21d commit 3d4ea65
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Model/IMAPMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,10 @@ private function loadMessageBodies(): void {
*/
private function getPart(Horde_Mime_Part $p, $partNo): void {
// Regular attachments
if ($p->isAttachment() || $p->getType() === 'message/rfc822') {
$isAttachment = ($p->isAttachment() || $p->getType() === 'message/rfc822') &&
!in_array($p->getType(), ['application/pgp-signature', 'application/pkcs7-signature', 'application/x-pkcs7-signature']);

if ($isAttachment) {
$this->attachments[] = [
'id' => $p->getMimeId(),
'messageId' => $this->messageId,
Expand Down

0 comments on commit 3d4ea65

Please sign in to comment.