nextcloud / nextcloud/mail

S/MIME singing only works if mailbody is empty or has just one word

Open
#9,796 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. to triage bug feature:smime
Dominant language
JavaScript
Stars
1k
Forks
348
Avg merge
12h 28m
Merged PRs (30d)
91

Description

Steps to reproduce
  1. install a S/MIME Certificate
  2. add Cert to the Mail-Account
  3. Send a Mail "S/MIME signed" with no Text in the body => Works fine
  4. Send a Mail "S/MIME signed" with Text in the body => Singing invalid (view Sent-Folder)

See test results of "Test Signing 1" with empty mail body and "Test Signign 2" with filled mail body:
signed_none_empty_mailbody
signed_empty_mailbody

Expected behavior

Mails with Attachments and/or Text in Mailbody should be signed properly.

Actual behavior

For signed emails with attachments and/or text in the mail body, the signature verification fails.

Mail app version

mail: 3.7.2

Mailserver or service

No response

Operating system

archlinux arm

PHP engine version

PHP 8.3

Web server

Nginx

Database

MariaDB

Additional info

Hint: Mail encryption works as espected.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with S/MIME-signed messages containing body text and attachments, comparing them with an empty message. Trace the signing and verification flow used by the Mail app. Done means signed messages with text and/or attachments verify successfully, while the existing empty-body case continues to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.