We have one client for who we provide a hosted ownCloud instance.
They are unable to invite a handful of email addresses via the DAV backend, using the ownCloud Calendar from the marketplace as a front end, all of who are registered on ownCloud as users, via their Apple Calendar.
Steps to reproduce
- Install ownCloud Calendar from the marketplace and create a test calendar and event
- Add this to Apple Calendar (this may also affect other clients…)
- Invite a problematic user to your calendar event (it seemingly only affects a specific random subset of users that are registered on the ownCloud instance)
In both cases the client is PUT’ing a VCALENDAR object to the server.
Expected behaviour
The request to the DAV backend should succeed and the end result is the user is an attendee of the event and an email is issued to them (I’m not sure where ownCloud calendar is responsible and where the DAV backend is responsible but the issue appears to be with the backend…)
This request is in the Apache log when I save the event with most email addresses:
[19/Mar/2021:08:38:02 +0100] “PUT /owncloud/remote.php/dav/calendars/redacted/redacted/redacted.ics HTTP/1.1” 201 - “-” “Mac+OS+X CalendarAgent”
[19/Mar/2021:08:38:02 +0100] “GET /owncloud/remote.php/dav/calendars/redacted/redacted/redacted.ics HTTP/1.1” 200 1082 “-” “Mac+OS+X CalendarAgent”
I turned enhanced Apache I/O logging on and this is what is spat out by ownCloud when it succeeds:
HTTP/1.1 200 OK and a valid VCALENDAR response.
Actual behaviour
But if I add a small number of email addresses associated with users registered on this ownCloud instance:
[19/Mar/2021:08:39:59 +0100] “PUT /owncloud/remote.php/dav/calendars/redacted/redacted/redacted.ics HTTP/1.1” 401 448 “-” “Mac+OS+X CalendarAgent”
[19/Mar/2021:08:39:59 +0100] “PUT /owncloud/remote.php/dav/calendars/redacted/redacted/redacted.ics HTTP/1.1” 404 239 “-” “Mac+OS+X CalendarAgent”
And when it fails:
HTTP/1.1 404 Not Found and an xml response:
\n\n Sabre\DAV\Exception\NotFound\n Principal with name RedactedFirstname%20RedactedLastname not found\n\n
Where the above RedactedFirstname and RedactedLastname are the first name and last name of the user for example Joe%20Bloggs, seperated by %20 which is of course an encoded space. For this particular user, I reproduced it on my own Apple Calendar too where this user is NOT stored in Apple Contacts, or anywhere else on the Mac and it is NOT provided by the submitted VCALENDAR to the server so the only place it could pick this first name and last name up from is ownCloud, indicating it is linking it somehow to the ownCloud account, but then failing with a SabreDAV error.
The result is the calendar object is NOT saved on the server and NO invite is sent out to this user, and Apple Calendar keeps spitting out an error over and over.
Server configuration
Operating system: CentOS 8
Web server: Apache 2.4
Database: MySQL 8
PHP version: PHP 7.4
ownCloud version: 10.6
Updated from an older ownCloud or fresh install: Updated over time as new ownCloud versions are released, don’t recall where we began…
Where did you install ownCloud from: CentOS 8 repository baseurl=http://download.owncloud.org/download/repositories/production/CentOS_8
Signing status (ownCloud 9.0 and above):
“No errors have been found”
The content of config/config.php:
{
“system”: {
“updatechecker”: false,
“instanceid”: REMOVED SENSITIVE VALUE
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“secret”: “REMOVED SENSITIVE VALUE”,
“trusted_domains”: [
REMOVED SENSITIVE VALUE
],
“datadirectory”: “/var/owncloud/data”,
“overwrite.cli.url”: “REMOVED SENSITIVE VALUE”,
“dbtype”: “mysql”,
“version”: “10.6.0.5”,
“dbname”: “owncloud”,
“dbhost”: “localhost”,
“dbtableprefix”: “oc_”,
“mysql.utf8mb4”: true,
“dbuser”: “REMOVED SENSITIVE VALUE”,
“dbpassword”: “REMOVED SENSITIVE VALUE”,
“logtimezone”: “UTC”,
“apps_paths”: [
{
“path”: “/var/www/html/owncloud/apps”,
“url”: “/apps”,
“writable”: false
},
{
“path”: “/var/www/html/owncloud/apps-external”,
“url”: “/apps-external”,
“writable”: true
}
],
“installed”: true,
“mail_domain”: “REMOVED SENSITIVE VALUE”,
“mail_from_address”: “REMOVED SENSITIVE VALUE”, “mail_smtpmode”: “php”,
“memcache.locking”: “\OC\Memcache\Redis”,
“memcache.local”: “\OC\Memcache\Redis”,
“redis”: {
“host”: “localhost”,
“port”: 6379
},
“loglevel”: 3,
“maintenance”: false,
“theme”: “”
},
“apps”: {
“activity”: {
“enabled”: “yes”,
“installed_version”: “2.6.0”,
“signed”: “true”,
“types”: “filesystem”
},
“backgroundjob”: {
“lastjob”: “17”
},
“calendar”: {
“enabled”: “yes”,
“installed_version”: “1.6.4”,
“signed”: “true”,
“types”: “”
},
“comments”: {
“enabled”: “yes”,
“installed_version”: “0.3.0”,
“types”: “logging,dav”
},
“configreport”: {
“enabled”: “yes”,
“installed_version”: “0.2.0”,
“types”: “filesystem”
},
“core”: {
“backgroundjobs_mode”: “cron”,
“first_install_version”: “10.5.0.10”,
“installedat”: “1600183479.3805”,
“lastcron”: “1616219103”,
“lastupdateResult”: “[]”,
“lastupdatedat”: “1616155207”,
“oc.integritycheck.checker”: “[]”,
“public_files”: “files_sharing/public.php”,
“public_webdav”: “dav/appinfo/v1/publicwebdav.php”,
“shareapi_default_expire_date”: “no”,
“shareapi_enforce_expire_date”: “no”,
“updater.secret.created”: “1612533839”,
“vendor”: “owncloud”
},
“dav”: {
“enabled”: “yes”,
“installed_version”: “0.6.0”,
“types”: “filesystem”
},
“federatedfilesharing”: {
“enabled”: “yes”,
“installed_version”: “0.5.0”,
“types”: “filesystem”
},
“federation”: {
“enabled”: “yes”,
“installed_version”: “0.1.0”,
“types”: “authentication”
},
“files”: {
“cronjob_scan_files”: “500”,
“enabled”: “yes”,
“installed_version”: “1.5.2”,
“types”: “filesystem”
},
“files_external”: {
“enabled”: “yes”,
“installed_version”: “0.7.1”,
“types”: “filesystem”
},
“files_mediaviewer”: {
“enabled”: “yes”,
“installed_version”: “1.0.4”,
“signed”: “true”,
“types”: “”
},
“files_pdfviewer”: {
“enabled”: “yes”,
“installed_version”: “0.11.2”,
“signed”: “true”,
“types”: “”
},
“files_sharing”: {
“enabled”: “yes”,
“installed_version”: “0.14.0”,
“types”: “filesystem”
},
“files_texteditor”: {
“enabled”: “yes”,
“installed_version”: “2.3.0”,
“types”: “”
},
“files_trashbin”: {
“enabled”: “yes”,
“installed_version”: “0.9.1”,
“types”: “filesystem”
},
“files_versions”: {
“enabled”: “yes”,
“installed_version”: “1.3.0”,
“types”: “filesystem”
},
“firstrunwizard”: {
“enabled”: “yes”,
“installed_version”: “1.2.0”,
“types”: “”
},
“impersonate”: {
“enabled”: “yes”,
“impersonate_all_groupadmins”: “false”,
“impersonate_include_groups”: “true”,
“impersonate_include_groups_list”: “[“admin”]”, “installed_version”: “0.5.0”,
“signed”: “true”,
“types”: “”
},
“market”: {
“activity”: “2.6.0”,
“enabled”: “yes”,
“files_mediaviewer”: “1.0.4”,
“files_pdfviewer”: “0.11.2”,
“installed_version”: “0.6.0”,
“twofactor_totp”: “0.7.1”,
“types”: “”
},
“notifications”: {
“enabled”: “yes”,
“installed_version”: “0.5.2”,
“types”: “logging”
},
“provisioning_api”: {
“enabled”: “yes”,
“installed_version”: “0.5.0”,
“types”: “prevent_group_restriction”
},
“systemtags”: {
“enabled”: “yes”,
“installed_version”: “0.3.0”,
“types”: “logging”
},
“templateeditor”: {
“enabled”: “yes”,
“installed_version”: “0.4.0”,
“types”: “”
},
“twofactor_totp”: {
“enabled”: “yes”,
“installed_version”: “0.7.1”,
“signed”: “true”,
“types”: “”
},
“updatenotification”: {
“core”: “10.6.0”,
“enabled”: “yes”,
“installed_version”: “0.2.1”,
“notify_groups”: “[]”,
“types”: “”
}
}
}
List of activated apps:
Enabled:
- activity: 2.6.0
- calendar: 1.6.4
- comments: 0.3.0
- configreport: 0.2.0
- dav: 0.6.0
- federatedfilesharing: 0.5.0
- federation: 0.1.0
- files: 1.5.2
- files_external: 0.7.1
- files_mediaviewer: 1.0.4
- files_pdfviewer: 0.11.2
- files_sharing: 0.14.0
- files_texteditor: 2.3.0
- files_trashbin: 0.9.1
- files_versions: 1.3.0
- firstrunwizard: 1.2.0
- impersonate: 0.5.0
- market: 0.6.0
- notifications: 0.5.2
- provisioning_api: 0.5.0
- systemtags: 0.3.0
- templateeditor: 0.4.0
- twofactor_totp: 0.7.1
- updatenotification: 0.2.1
Are you using external storage, if yes which one: No
Are you using encryption: Disk is LUKS encrypted so encrypted at rest and Apache is configured with HTTPS TLS 1.2+ so encrypted in transit?
Are you using an external user-backend, if yes which one: No
Client configuration
Browser: Apple Calendar
Operating system: MacOS High Sierra
Logs
Web server error log
See above in actual/expected behaviour
ownCloud log (data/owncloud.log)
{“reqId”:“redacted”,“level”:0,“time”:“2021-03-31T13:58:23+00:00”,“remoteAddr”:“redacted”,“user”:“redacted”,“app”:“webdav”,“method”:“PUT”,“url”:"/owncloud/remote.php/dav/calendars/redacted/personal/redacted.ics",“message”:“Exception: HTTP/1.1 404 Principal with name Joe%20Bloggs not found: {“Exception”:“Sabre\\DAV\\Exception\\NotFound”,“Message”:“Principal with name Joe%20Bloggs not found”,“Code”:0,“Trace”:”#0 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Tree.php(78): Sabre\\DAVACL\\AbstractPrincipalCollection->getChild()\n#1 \/var\/www\/html\/owncloud\/apps\/dav\/lib\/Tree.php(51): Sabre\\DAV\\Tree->getNodeForPath()\n#2 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Tree.php(73): OCA\\DAV\\Tree->getNodeForPath()\n#3 \/var\/www\/html\/owncloud\/apps\/dav\/lib\/Tree.php(51): Sabre\\DAV\\Tree->getNodeForPath()\n#4 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAVACL\/Plugin.php(601): OCA\\DAV\\Tree->getNodeForPath()\n#5 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAVACL\/Plugin.php(199): Sabre\\DAVACL\\Plugin->getCurrentUserPrivilegeSet()\n#6 \/var\/www\/html\/owncloud\/apps\/dav\/lib\/Connector\/Sabre\/DavAclPlugin.php(51): Sabre\\DAVACL\\Plugin->checkPrivileges()\n#7 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/CalDAV\/Schedule\/Plugin.php(472): OCA\\DAV\\Connector\\Sabre\\DavAclPlugin->checkPrivileges()\n#8 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/event\/lib\/WildcardEmitterTrait.php(89): Sabre\\CalDAV\\Schedule\\Plugin->scheduleLocalDelivery()\n#9 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/CalDAV\/Schedule\/Plugin.php(350): Sabre\\DAV\\Server->emit()\n#10 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/CalDAV\/Schedule\/Plugin.php(626): Sabre\\CalDAV\\Schedule\\Plugin->deliver()\n#11 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/CalDAV\/Schedule\/Plugin.php(337): Sabre\\CalDAV\\Schedule\\Plugin->processICalendarChange()\n#12 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/event\/lib\/WildcardEmitterTrait.php(89): Sabre\\CalDAV\\Schedule\\Plugin->calendarObjectChange()\n#13 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/CalDAV\/Plugin.php(897): Sabre\\DAV\\Server->emit()\n#14 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/CalDAV\/Plugin.php(739): Sabre\\CalDAV\\Plugin->validateICalendar()\n#15 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/event\/lib\/WildcardEmitterTrait.php(89): Sabre\\CalDAV\\Plugin->beforeWriteContent()\n#16 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(1133): Sabre\\DAV\\Server->emit()\n#17 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/CorePlugin.php(492): Sabre\\DAV\\Server->updateFile()\n#18 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/event\/lib\/WildcardEmitterTrait.php(89): Sabre\\DAV\\CorePlugin->httpPut()\n#19 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(472): Sabre\\DAV\\Server->emit()\n#20 \/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAV\/Server.php(253): Sabre\\DAV\\Server->invokeMethod()\n#21 \/var\/www\/html\/owncloud\/apps\/dav\/lib\/Server.php(330): Sabre\\DAV\\Server->start()\n#22 \/var\/www\/html\/owncloud\/apps\/dav\/appinfo\/v2\/remote.php(31): OCA\\DAV\\Server->exec()\n#23 \/var\/www\/html\/owncloud\/remote.php(165): require_once(’\/var\/www\/html\/o…’)\n#24 {main}",“File”:"\/var\/www\/html\/owncloud\/lib\/composer\/sabre\/dav\/lib\/DAVACL\/AbstractPrincipalCollection.php",“Line”:116}"}
Browser log
Apple Calendar only spits out a very basic error alert window along the lines of “Server Error”