nextcloud / nextcloud/server

[Bug]: Removing an attendee does not send iMIP CANCEL email

Open Beginner friendly
#63,242 0 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 32-feedback bug feature: caldav
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description

Bug description

When an organizer removes one attendee from an existing event, Nextcloud
correctly creates an iTIP CANCEL message for the removed attendee, but the
iMIP plugin subsequently discards the message because the CANCEL event is
identical to the previous event.

As a result, the removed attendee does not receive the cancellation email.

Steps to reproduce

  1. Create an event as user A.
  2. Add attendees B and C.
  3. Optional: Have both attendees accept the invitation.
  4. Edit the event as the organizer.
  5. Remove attendee B while keeping attendee C.
  6. Save the event.

Expected behavior

Attendee B receives an email containing an iTIP METHOD:CANCEL message.

Attendee C receives the normal updated METHOD:REQUEST message.

Actual behavior

Attendee C receives the updated event.

Attendee B does not receive an email.

The Nextcloud log contains:

iTip message said the change was significant but comparison did not detect any updated VEvents

Relevant log/debug information

The iTIP broker creates the CANCEL correctly:

method: CANCEL
recipient: mailto:<removed-attendee>
sequence: 5

The generated CANCEL contains the removed attendee as expected.

However, IMipPlugin calls:

$modified = $this->eventComparisonService->findModified($newEvents, $oldEvents);

For the CANCEL message, $newEvents and $oldEvents are intentionally
identical. Therefore findModified() returns no modified VEvent and
$vEvent becomes empty.

The following check then aborts processing:

if (empty($vEvent)) {
    ...
    return;
}

Environment

Nextcloud Server: 34.0.2.1
Calendar app: 6.5.3
Installation: container/Kubernetes (k3s)

Workaround / tested patch

The following change fixes the problem:

if (empty($vEvent) && strtoupper($iTipMessage->method) === 'CANCEL') {
    $vEvent = $newEvents->VEVENT ?? null;
}

This was tested with the reproduction steps above. After applying the
change, the removed attendee receives the expected cancellation email.

The existing EventComparisonService behavior does not need to be changed,
because an iTIP CANCEL intentionally contains the event being cancelled.

Possibly related issues

#6838 and #52882 are not describing the same Issue and the corresponding fixes
won't help.

Steps to reproduce
  1. Create an event as user A.
  2. Add attendees B and C.
  3. Optional: Have both attendees accept the invitation.
  4. Edit the event as the organizer.
  5. Remove attendee B while keeping attendee C.
  6. Save the event.
Expected behavior

Attendee B receives iMIP CANCEL email

Nextcloud Server version

32

Operating system

None

PHP engine version

None

Web server

Other

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

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 in IMipPlugin at the empty $vEvent check after eventComparisonService->findModified() is called. Compare the CANCEL path with the normal REQUEST path and reproduce the attendee-removal scenario. Done means the removed attendee receives an iTIP METHOD:CANCEL email while the remaining attendee still receives the updated METHOD:REQUEST message.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.