nextcloud / server

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

[Bug]: MKCALENDAR without supported-calendar-component-set doesn't support journals by default #45709

Closed rfc2822 closed 3 weeks ago

rfc2822 commented 3 months ago

⚠️ This issue respects the following points: ⚠️

Bug description

When sending a MKCALENDAR request without supported-calendar-component-set, Nextcloud creates a collection that reports to support VEVENT and VTODO, but not VJOURNAL.

However, it is possible to create a collection that supports all three component types, because it works when it's explicitly requested.

Steps to reproduce

  1. Create calendar with MKCALENDAR (without supported-calendar-component-set).
  2. Do PROPFIND on the new calendar and request supported-calendar-component-set.
  3. supported-calendar-component-set contains only VEVENT and VTODO (but not VJOURNAL).

To verify that it's possible to create collections that contain VEVENT, VTODO and VJOURNAL:

  1. Create another calendar with MKCALENDAR and specify supported-calendar-component-set = (VEVENT,VTODO,VJOURNAL).
  2. Do PROPFIND on the new calendar and request supported-calendar-component-set.
  3. supported-calendar-component-set contains VEVENT, VTODO and VJOURNAL.

Expected behavior

The CalDAV RFC says:

In the absence of this property [supported-calendar-component-set], the server MUST accept all component types, and the client can assume that all component types are accepted.

So collections that are created without supported-calendar-component-set should also support journals.

Installation method

Community Manual installation with Archive

Nextcloud Server version

28

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?

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "davtest.dev001.net"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "28.0.4.1",
        "overwrite.cli.url": "https:\/\/davtest.dev001.net\/nextcloud",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "loglevel": 0,
        "logdateformat": "F d, Y H:i:s",
        "log_rotate_size": 104857600,
        "maintenance": false,
        "theme": "",
        "debug": true,
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

List of activated Apps

Enabled:
  - activity: 2.20.0
  - calendar: 4.7.3
  - calendar_resource_management: 0.7.0
  - circles: 28.0.0
  - cloud_federation_api: 1.11.0
  - comments: 1.18.0
  - contacts: 5.5.3
  - contactsinteraction: 1.9.0
  - dashboard: 7.8.0
  - dav: 1.29.1
  - dav_push: 0.0.1
  - dav_push_notify_push_transport: 0.0.1
  - deck: 1.12.2
  - federatedfilesharing: 1.18.0
  - federation: 1.18.0
  - files: 2.0.0
  - files_pdfviewer: 2.9.0
  - files_reminders: 1.1.0
  - files_sharing: 1.20.0
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - firstrunwizard: 2.17.0
  - impersonate: 1.15.0
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - nextcloud_announcements: 1.17.0
  - notes: 4.10.0
  - notifications: 2.16.0
  - oauth2: 1.16.3
  - password_policy: 1.18.0
  - photos: 2.4.0
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - recommendations: 2.0.0
  - related_resources: 1.3.0
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - support: 1.11.1
  - survey_client: 1.16.0
  - systemtags: 1.18.0
  - tasks: 0.16.0
  - text: 3.9.1
  - theming: 2.3.0
  - twofactor_backupcodes: 1.17.0
  - updatenotification: 1.18.0
  - user_status: 1.8.1
  - viewer: 2.2.0
  - weather_status: 1.8.0
  - workflowengine: 2.10.0
Disabled:
  - admin_audit: 1.18.0
  - bruteforcesettings: 2.8.0
  - encryption: 2.16.0
  - files_external: 1.20.0
  - files_markdown: 2.4.1 (installed 2.4.1)
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - pushdemo: 0.0.1 (installed 0.0.1)
  - suspicious_login: 6.0.0
  - twofactor_totp: 10.0.0-beta.2
  - user_ldap: 1.19.0

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

kesselb commented 3 months ago

Thank you :+1:

https://github.com/nextcloud/server/blob/b769dc4304862af35946386a235d5e6fdb658ce9/apps/dav/lib/CalDAV/CalDavBackend.php#L757

Sabre also uses "VEVENT,VTODO" as default: https://github.com/sabre-io/dav/blame/7a736b73bea7040a7b6535fd92ff6de9981e5190/lib/CalDAV/Backend/PDO.php#L242

I don't know if that means something would be missing to support it properly, or just an oversight.

cc @miaulalala @st3iny

joshtrichards commented 3 months ago

Related: nextcloud/calendar#4436

st3iny commented 2 months ago

I think it is just an oversight and our backend should be able to handle VJOURNALs just fine. It is probably not included in our code because there is no "official" frontend to render VJOURNALs.