Skip to content

[Bug]: [CalDAV] CALDAV:schedule-default-calendar-URL is set on the principal instead of the scheduling inbox #57883

@rfc2822

Description

@rfc2822

⚠️ This issue respects the following points: ⚠️

Bug description

I have noticed that on our testing instance that we use to test Nextcloud integration with DAVx5, the CALDAV:schedule-default-calendar-URL is set on the principal, but not on the scheduling inbox, as required by RFC 6638: Default Calendar Collection:

The CALDAV:schedule-default-calendar-URL WebDAV property, which can be present on the scheduling Inbox collection of a calendar user, specifies whether this calendar user has a default calendar collection.

And in section 9.2:

This property MAY be defined on a scheduling Inbox collection.

So the property should at least be defined on the scheduling inbox collection.

Steps to reproduce

Contents of propfind.xml:

<?xml version="1.0" encoding="utf-8"?>
<D:propfind xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
  <D:prop>
    <D:current-user-principal/>
    <C:schedule-inbox-URL/>
    <C:schedule-default-calendar-URL/>
  </D:prop>
</D:propfind>

Step 1: Find principal URL over current-user-principal.

curl -u test:password -X PROPFIND --data @propfind.xml -H 'Depth: 0' https://nextcloud/remote.php/dav/ | xmllint --format -

<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
  <d:response>
    <d:href>/remote.php/dav/</d:href>
    <d:propstat>
      <d:prop>
        <d:current-user-principal>
          <d:href>/remote.php/dav/principals/users/test/</d:href>
        </d:current-user-principal>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
    ...
  </d:response>
</d:multistatus>

Step 2: Query principal URL for scheduling inbox URL:

$ curl -u test:password -X PROPFIND --data @propfind.xml -H 'Depth: 0' https://nextcloud/remote.php/dav/principals/users/test/ | xmllint --format -

<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:card="urn:ietf:params:xml:ns:carddav" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
  <d:response>
    <d:href>/remote.php/dav/principals/users/test/</d:href>
    <d:propstat>
      <d:prop>
        ...
        <cal:schedule-inbox-URL>
          <d:href>/remote.php/dav/calendars/test/inbox/</d:href>
        </cal:schedule-inbox-URL>
        <cal:schedule-default-calendar-URL>
          <d:href>/remote.php/dav/calendars/test/personal/</d:href>
        </cal:schedule-default-calendar-URL>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>

→ the scheduling inbox URL is /remote.php/dav/calendars/test/inbox/.

(Note that there's already a schedule-default-calendar-URL set for the principal.)

Step 3: Query the scheduling inbox for the default calendar

$ curl -u test:password -X PROPFIND --data @propfind.xml -H 'Depth: 0' https://nextcloud/remote.php/dav/calendars/test/inbox/ | xmllint --format -

<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
  <d:response>
    <d:href>/remote.php/dav/calendars/test/inbox/</d:href>
    ...
    <d:propstat>
      <d:prop>
        <cal:schedule-inbox-URL/>
        <cal:schedule-default-calendar-URL/>
      </d:prop>
      <d:status>HTTP/1.1 404 Not Found</d:status>
    </d:propstat>
  </d:response>
</d:multistatus>

→ On the scheduling inbox, schedule-default-calendar-URL is not set, although it should be.

Expected behavior

The schedule-default-calendar-URL property should be set on the scheduling inbox.

Nextcloud Server version

32

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

Found that when trying to implement the standards-compliant "Find default calendar of user" operation for bitfireAT/davx5-ose#1945.

Other compliant CalDAV clients will also look for the property of the inbox, not on the principal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions