⚠️ This issue respects the following points: ⚠️
Bug description
This is a technical report and I'm unsure if it's a bug but it seems potentially dangerous to me. Not sure if the community forum is the right place to open such a discussion so I'm bringing it to GitHub.
- If a user "user1" has a calendar with id 1 in database
- And a user "user2" creates a calendar subscription with id 1 in database
- The calendar objects of the subscription are stored with the calendar id 1
See
And
The calendar subscription id and the calendar id are both being used as foreign keys in the calendar objects table and they can clash. Is this intentional design or could it lead to some data of user2 being visible to user1 in some cases?
Steps to reproduce
- Create two users "user1" and "user2" (in the same order) in a new nextcloud instance
- Create a new calendar subscription for "user2"
- Let the
RefreshWebcalJob run to sync events for subscription
- Check database for the calendar objects of the calendar subscription using
SELECT co.calendarid, c.principaluri AS calendar_principaluri, s.principaluri AS subscription_principaluri
FROM oc_calendarobjects co
JOIN oc_calendars c ON (c.id = co.calendarid)
JOIN oc_calendarsubscriptions s ON (c.id = s.id)
WHERE co.calendartype=1 and s.principaluri = 'principals/users/user2'
AND c.principaluri = 'principals/users/user1';
I see something like
+------------+--------------------------------+--------------------------------+
| calendarid | calendar_principaluri | subscription_principaluri |
+------------+--------------------------------+--------------------------------+
| 1 | principals/users/user1 | principals/users/user2 |
| 1 | principals/users/user1 | principals/users/user2 |
| 1 | principals/users/user1 | principals/users/user2 |
....
+------------+--------------------------------+--------------------------------+
39 rows in set (0.003 sec)
Expected behavior
- A new calendar with a new id that stores only subscription data?
Nextcloud Server version
33
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.4
Web server
Nginx
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
Bug description
This is a technical report and I'm unsure if it's a bug but it seems potentially dangerous to me. Not sure if the community forum is the right place to open such a discussion so I'm bringing it to GitHub.
See
server/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php
Line 122 in d1d0070
And
server/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php
Line 137 in d1d0070
The calendar subscription id and the calendar id are both being used as foreign keys in the calendar objects table and they can clash. Is this intentional design or could it lead to some data of user2 being visible to user1 in some cases?
Steps to reproduce
RefreshWebcalJobrun to sync events for subscriptionI see something like
Expected behavior
Nextcloud Server version
33
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.4
Web server
Nginx
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response