nextcloud / server

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

[Bug]: Suddenly can't add event from Guest account #45743

Open panomitrius opened 3 months ago

panomitrius commented 3 months ago

⚠️ This issue respects the following points: ⚠️

Bug description

Since some days ago I can't any longer add events on a shared calendar from a guest account. I get error message in the logs (see below). No error message, but after trying to add the event, it's just blank. I can add events to the calender when logged in as the user who created the calendar.

Steps to reproduce

  1. Create calendar
  2. Create guest account
  3. Share the calendar with the guest account
  4. Create event in the shared calendar from guest account

Expected behavior

Event gets created (as before)

Installation method

Community Docker image

Nextcloud Server version

28

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Nginx

Database engine version

MySQL

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

Updated from a MINOR version (ex. 22.1 to 22.2)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

Configuration report

{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost:9000"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "29.0.1.1",
        "overwrite.cli.url": "http:\/\/localhost:9000",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "overwritehost": "nextcloud.domainname.se:443",
        "overwriteprotocol": "https",
        "loglevel": 2,
        "maintenance": false,
        "maintenance_window_start": 1,
        "app_install_overwrite": [
            "joplin",
            "files_reader"
        ],
        "has_rebuilt_cache": true,
        "theme": ""
    }
}
ro

List of activated Apps

Enabled:
  - activity: 2.21.1
  - calendar: 4.7.6
  - circles: 29.0.0-dev
  - cloud_federation_api: 1.12.0
  - comments: 1.19.0
  - contacts: 6.0.0
  - contactsinteraction: 1.10.0
  - dashboard: 7.9.0
  - dav: 1.30.1
  - deck: 1.13.0
  - federatedfilesharing: 1.19.0
  - federation: 1.19.0
  - files: 2.1.0
  - files_downloadlimit: 2.0.0
  - files_external: 1.21.0
  - files_pdfviewer: 2.10.0
  - files_reminders: 1.2.0
  - files_sharing: 1.21.0
  - files_trashbin: 1.19.0
  - files_versions: 1.22.0
  - firstrunwizard: 2.18.0
  - forms: 4.2.4
  - guests: 3.1.0
  - logreader: 2.14.0
  - lookup_server_connector: 1.17.0
  - mail: 3.6.1
  - nextcloud_announcements: 1.18.0
  - notes: 4.10.0
  - notifications: 2.17.0
  - oauth2: 1.17.0
  - password_policy: 1.19.0
  - photos: 2.5.0
  - privacy: 1.13.0
  - provisioning_api: 1.19.0
  - recommendations: 2.1.0
  - related_resources: 1.4.0
  - richdocuments: 8.4.2
  - serverinfo: 1.19.0
  - settings: 1.12.0
  - sharebymail: 1.19.0
  - support: 1.12.0
  - survey_client: 1.17.0
  - systemtags: 1.19.0
  - text: 3.10.0
  - theming: 2.4.0
  - twofactor_backupcodes: 1.18.0
  - updatenotification: 1.19.1
  - user_status: 1.9.0
  - viewer: 2.3.0
  - weather_status: 1.9.0
  - workflowengine: 2.11.0
Disabled:
  - admin_audit: 1.19.0
  - apporder: 0.15.0 (installed 0.14.0)
  - bruteforcesettings: 2.9.0 (installed 2.3.0)
  - carnet: 0.25.4 (installed 0.25.2)
  - encryption: 2.17.0
  - files_markdown: 2.4.1 (installed 2.4.1)
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - files_texteditor: 2.15.1 (installed 2.15.1)
  - fulltextsearch: 27.0.1 (installed 27.0.1)
  - officeonline: 2.0.2 (installed 2.0.2)
  - onlyoffice: 8.2.0 (installed 8.2.0)
  - passwords: 2023.8.31 (installed 2023.8.31)
  - spreed: 17.0.3 (installed 17.0.3)
  - suspicious_login: 7.0.0
  - tasks: 0.15.0 (installed 0.15.0)
  - twofactor_totp: 11.0.0-dev
  - user_ldap: 1.20.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

Error    PHP                Array to string        2024-06-09T21:20:02+00:00 
                              conversion at                                    
                              /var/www/html/apps/dav/lib/CalDAV/Activity/Backend.php#561                           

  Error    PHP                Array to string        2024-06-09T21:20:02+00:00 
                              conversion at                                    
                              /var/www/html/apps/dav/lib/CalDAV/Activity/Backend.php#561                           

  Error    PHP                Array to string        2024-06-09T21:20:02+00:00 
                              conversion at                                    
                              /var/www/html/apps/dav/lib/CalDAV/Activity/Backend.php#561

Additional info

No response

joshtrichards commented 3 months ago

Thanks for the report.

Looks likely because of this (a multi-dimensional array gets passed up):

https://github.com/nextcloud/server/blob/7451105e3f77911525c95e88a522c7d0115d8d14/apps/dav/lib/DAV/Sharing/Backend.php#L123

Error is being triggered here:

https://github.com/nextcloud/server/blob/3bb0c9b012f0e87ccddd37e4782d3fb5ae2025a6/apps/dav/lib/CalDAV/Activity/Backend.php#L561

panomitrius commented 3 months ago

@joshtrichards Alright! Is there a fix for it I could implement? It's causing some logistical issues at the moment.