nextcloud / nextcloud/calendar
Adding a shared calendar via link fails if the calendar contains non- compliant VComponents
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 332
- Avg merge
- 16h 13m
- Merged PRs (30d)
- 137
Description
Steps to reproduce
Add a google calendar via share link.
{
"reqId":"WPDmb1ev23ZvuZRZGshW",
"level":2,
"time":"2022-08-18T12:45:55+00:00",
"remoteAddr":"127.0.0.1",
"user":"admin",
"app":"dav",
"method":"MKCOL",
"url":"/remote.php/dav/calendars/admin/calendargooglecom-1",
"message":"Subscription 2 could not be parsed",
"userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36",
"version":"25.0.0.5",
"exception":{
"Exception":"Sabre\\VObject\\ParseException",
"Message":"This parser only supports VCARD and VCALENDAR files",
"Code":0,
"Trace":[
{
"file":"/var/www/nextcloud/3rdparty/sabre/vobject/lib/Parser/MimeDir.php",
"line":90,
"function":"parseDocument",
"class":"Sabre\\VObject\\Parser\\MimeDir",
"type":"->"
},
{
"file":"/var/www/nextcloud/3rdparty/sabre/vobject/lib/Reader.php",
"line":47,
"function":"parse",
"class":"Sabre\\VObject\\Parser\\MimeDir",
"type":"->"
},
{
"file":"/var/www/nextcloud/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php",
"line":250,
"function":"read",
"class":"Sabre\\VObject\\Reader",
"type":"::"
},
{
"file":"/var/www/nextcloud/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php",
"line":89,
"function":"queryWebcalFeed",
"class":"OCA\\DAV\\CalDAV\\WebcalCaching\\RefreshWebcalService",
"type":"->"
},
{
"file":"/var/www/nextcloud/apps/dav/lib/Listener/SubscriptionListener.php",
"line":63,
"function":"refreshSubscription",
"class":"OCA\\DAV\\CalDAV\\WebcalCaching\\RefreshWebcalService",
"type":"->"
},
{
"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php",
"line":87,
"function":"handle",
"class":"OCA\\DAV\\Listener\\SubscriptionListener",
"type":"->"
},
{
"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
"line":251,
"function":"__invoke",
"class":"OC\\EventDispatcher\\ServiceEventListener",
"type":"->"
},
{
"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php",
"line":73,
"function":"callListeners",
"class":"Symfony\\Component\\EventDispatcher\\EventDispatcher",
"type":"->"
},
{
"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php",
"line":88,
"function":"dispatch",
"class":"Symfony\\Component\\EventDispatcher\\EventDispatcher",
"type":"->"
},
{
"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php",
"line":100,
"function":"dispatch",
"class":"OC\\EventDispatcher\\EventDispatcher",
"type":"->"
},
{
"file":"/var/www/nextcloud/apps/dav/lib/CalDAV/CalDavBackend.php",
"line":2453,
"function":"dispatchTyped",
"class":"OC\\EventDispatcher\\EventDispatcher",
"type":"->"
},
{
"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/CalDAV/CalendarHome.php",
"line":249,
"function":"createSubscription",
"class":"OCA\\DAV\\CalDAV\\CalDavBackend",
"type":"->"
},
{
"file":"/var/www/nextcloud/apps/dav/lib/CalDAV/CalendarHome.php",
"line":93,
"function":"createExtendedCollection",
"class":"Sabre\\CalDAV\\CalendarHome",
"type":"->"
},
{
"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line":1199,
"function":"createExtendedCollection",
"class":"OCA\\DAV\\CalDAV\\CalendarHome",
"type":"->"
},
{
"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line":560,
"function":"createCollection",
"class":"Sabre\\DAV\\Server",
"type":"->"
},
{
"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
"line":89,
"function":"httpMkcol",
"class":"Sabre\\DAV\\CorePlugin",
"type":"->"
},
{
"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line":472,
"function":"emit",
"class":"Sabre\\DAV\\Server",
"type":"->"
},
{
"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line":253,
"function":"invokeMethod",
"class":"Sabre\\DAV\\Server",
"type":"->"
},
{
"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line":321,
"function":"start",
"class":"Sabre\\DAV\\Server",
"type":"->"
},
{
"file":"/var/www/nextcloud/apps/dav/lib/Server.php",
"line":357,
"function":"exec",
"class":"Sabre\\DAV\\Server",
"type":"->"
},
{
"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php",
"line":35,
"function":"exec",
"class":"OCA\\DAV\\Server",
"type":"->"
},
{
"file":"/var/www/nextcloud/remote.php",
"line":167,
"args":[
"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"
],
"function":"require_once"
}
],
"File":"/var/www/nextcloud/3rdparty/sabre/vobject/lib/Parser/MimeDir.php",
"Line":163,
"message":"Subscription 2 could not be parsed",
"exception":{
},
"CustomMessage":"Subscription 2 could not be parsed"
}
}
Expected behavior
The parser skips VComponents gracefully and still displays allowed VComponents VCARD and VCALENDAR.
OR
The calendar entry in the left sidebar in calendar shows an error icon that let's the user know there is an issue with this calendar.
Actual behaviour
The parser fails and doesn't show any events at all.
Calendar app version
No response
CalDAV-clients used
Web
Browser
No response
Client operating system
No response
Server operating system
No response
Web server
Apache
Database engine version
MySQL
PHP engine version
PHP 8.0
Nextcloud version
No response
Updated from an older installed version or fresh install
No response
List of activated apps
No response
Nextcloud configuration
No response
Web server error log
No response
Log file
No response
Browser log
No response
Additional info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the stack trace in apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php, especially queryWebcalFeed and refreshSubscription, and trace how the Sabre VObject reader handles the subscribed feed. Reproduce the Google calendar link failure and verify that allowed VCARD or VCALENDAR components remain available while unsupported components are skipped or the calendar visibly reports an error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100