nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.24k stars 3.95k forks source link

[Bug]: (CalDAV) Calendar event cancellation iMip messages are sent twice, on delete and on trash empty #45677

Open SebastianKrupinski opened 1 month ago

SebastianKrupinski commented 1 month ago

⚠️ This issue respects the following points: ⚠️

Bug description

Calendar iMip messages are sent twice, once when the event is deleted and once when the trash is emptied

Steps to reproduce

  1. Create Event (In the future) with attendee (has email address)
  2. Delete Event with attendee
  3. Empty trash bin

Expected behavior

Calendar iMip message should only be sent once on delete

Installation method

None

Nextcloud Server version

master

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

Nginx

Database engine version

MySQL

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

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

Configuration report

N/A

List of activated Apps

N/A

Nextcloud Signing status

N/A

Nextcloud Logs

N/A

Additional info

No response

SebastianKrupinski commented 1 month ago

Tested with single and multiple attendees and external email client

Created Event Message Created

Deleted Event Message Deleted

Trash Empty Message Trash Emptied

SebastianKrupinski commented 1 month ago

Possible solution.

Add check to determine if message was deleted or trash was emptied in iMipPlugin Schedule function.

https://github.com/nextcloud/server/blob/94bc020d073011eec8e1f084e9521356574e42f7/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php#L106