Skip to content

[Bug]: (CalDAV) MOVE command incorrectly ignores destination target ID #50748

@SebastianKrupinski

Description

@SebastianKrupinski

⚠️ This issue respects the following points: ⚠️

Bug description

The DAV MOVE command specifies a destination/target ID for the new object in the header.

:method: MOVE
:scheme: https
:path: /remote.php/dav/calendars/user1/personal/A4B956AB-70E1-4C37-BA82-7057FDB86357.ics
:authority: 192.168.254.41
accept: */*
destination: https://192.168.254.41/remote.php/dav/calendars/user1/personal-2/9D8C6604-80E2-45D9-B1B8-05595DA363F3.ics

But the OCA\DAV\CalDAV\Calendar.php::moveInto() function ignores the target ID when moving the object causing errors when the client software confirms that the object has been created.

return $this->caldavBackend->moveCalendarObject($sourceNode->getCalendarId(), (int)$this->calendarInfo['id'], $sourceNode->getId(), $sourceNode->getOwner(), $this->getOwner());

Move Command:

Image

Propfind Command on new object:

Image

Steps to reproduce

  1. Create a calendar entry using external client (iPhone)
  2. Move event from one Calendar to Another

Expected behavior

Move command should create object with designated id

Nextcloud Server version

master

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

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?

  • 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

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions