Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External ICS calendars fail to display if the UID includes slash #19980

Closed
artfulrobot opened this issue Mar 16, 2020 · 14 comments · Fixed by #19986
Closed

External ICS calendars fail to display if the UID includes slash #19980

artfulrobot opened this issue Mar 16, 2020 · 14 comments · Fixed by #19986
Assignees
Labels

Comments

@artfulrobot
Copy link

Steps to reproduce

Create a file somewhere public with an http link to it with the following.

BEGIN:VCALENDAR
VERSION:2.0
PRODID: f2444c69b39463a8622ec7eab6bbe275
BEGIN:VEVENT
UID:something/valid
DTSTAMP:20200310T000000
DTSTART:20200316T160000
DTEND:20200316T170000
SUMMARY:Does not work
END:VEVENT
END:VCALENDAR

Import that URL using the "new subscription from link" UI.

Try to view the event

Expected behaviour

Event is shown, since the ICS is valid according to spec, as validated using https://icalendar.org/validator.html

Actual behaviour

calendar indicator shows whirling spinner; never loads.

Server configuration detail

Operating system: Linux 4.9.0-11-amd64 nextcloud/calendar#1 SMP Debian 4.9.189-3+deb9u1 (2019-09-20) x86_64

Webserver: nginx/1.10.3 (fpm-fcgi)

Database: mysql 10.1.41

PHP version:

7.2.24-1+020191026.31+debian91.gbpbbacde
Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, sodium, session, standard, cgi-fcgi, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, igbinary, imagick, intl, json, exif, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, Zend OPcache, xdebug

Nextcloud version: 18.0.2 - 18.0.2.2

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: unknown

Signing status

Array
(
)

List of activated apps
Enabled:
 - accessibility: 1.4.0
 - activity: 2.11.0
 - analytics: 2.1.1
 - apporder: 0.9.0
 - bookmarks: 2.3.4
 - bruteforcesettings: 1.5.0
 - calendar: 2.0.2
 - cloud_federation_api: 1.1.0
 - comments: 1.8.0
 - contacts: 3.2.0
 - dav: 1.14.0
 - deck: 0.8.0
 - federatedfilesharing: 1.8.0
 - files: 1.13.1
 - files_external: 1.9.0
 - files_fulltextsearch: 1.4.1
 - files_linkeditor: 1.0.13
 - files_pdfviewer: 1.7.0
 - files_rightclick: 0.15.2
 - files_sharing: 1.10.1
 - files_trashbin: 1.8.0
 - files_versions: 1.11.0
 - files_videoplayer: 1.7.0
 - fulltextsearch: 1.4.1
 - fulltextsearch_elasticsearch: 1.5.0
 - impersonate: 1.5.0
 - issuetemplate: 0.6.0
 - logreader: 2.3.0
 - lookup_server_connector: 1.6.0
 - news: 14.1.3
 - nextcloud_announcements: 1.7.0
 - notes: 3.2.0
 - notifications: 2.6.0
 - oauth2: 1.6.0
 - password_policy: 1.8.0
 - phonetrack: 0.6.2
 - photos: 1.0.0
 - polls: 1.3.0
 - previewgenerator: 2.2.0
 - privacy: 1.2.0
 - provisioning_api: 1.8.0
 - recommendations: 0.6.0
 - serverinfo: 1.8.0
 - settings: 1.0.0
 - spreed: 8.0.5
 - survey_client: 1.6.0
 - systemtags: 1.8.0
 - text: 2.0.0
 - theming: 1.9.0
 - theming_customcss: 1.5.0
 - twofactor_backupcodes: 1.7.0
 - updatenotification: 1.8.0
 - viewer: 1.2.0
 - workflowengine: 2.0.0
Disabled:
 - admin_audit
 - bookmarks_fulltextsearch
 - encryption
 - federation
 - firstrunwizard
 - sharebymail
 - support
 - user_ldap

Configuration (config/config.php)
{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "safe.artfulrobot.uk"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "overwrite.cli.url": "https:\/\/safe.artfulrobot.uk",
    "dbtype": "mysql",
    "version": "18.0.2.2",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "htaccess.RewriteBase": "\/",
    "overwritewebroot": "\/",
    "theme": "",
    "loglevel": 2,
    "maintenance": false,
    "updater.release.channel": "stable",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpmode": "smtp",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "simpleSignUpLink.shown": false,
    "mail_sendmailmode": "smtp",
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "memcache.local": "\\OC\\Memcache\\Redis",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 0,
        "dbindex": 0,
        "password": "***REMOVED SENSITIVE VALUE***",
        "timeout": 1.5
    },
    "app_install_overwrite": [
        "fulltextsearch_elasticsearch"
    ],
    "updater.secret": "***REMOVED SENSITIVE VALUE***"
}

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption:

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

Client configuration

Browser: Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0

Operating system:

Logs

Web server error log
none
Nextcloud log
nothing relevant at all
Browser log

REPORT https://safe.artfulrobot.uk/remote.php/dav/calendars/yyy/xxxxxxxxxx/

XHRREPORThttps://xxxxxxxxxxxxx/remote.php/dav/calendars/yyyy/xxxxxxxxx/
[HTTP/2 404 Not Found 146ms]

Response payload

1

2

<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">

3

<s:exception>Sabre\DAV\Exception\NotFound</s:exception>

4

<s:message>Calendar object not found</s:message>

5

</d:error>

6

@georgehrke
Copy link
Member

@artfulrobot I highly doubt that there is nothing in the Nextcloud.log
Please decrease then log level and check again.

@georgehrke
Copy link
Member

(After decreasing log-level, you will have to trigger the error again by reloading the calendar app)

@georgehrke
Copy link
Member

I tried to import the event and it works just fine:
105FCDA7-8F3A-4857-9886-B2181971E4A5

Will test with a link later, but there shouldn't be any difference.

@georgehrke
Copy link
Member

XHRREPORThttps://xxxxxxxxxxxxx/remote.php/dav/calendars/yyyy/xxxxxxxxx/
[HTTP/2 404 Not Found 146ms]

What do the latter yyyy and xxxxxxxxx parts looks like? Are they just plain text? Do they contain spaces or other special characters?

@artfulrobot
Copy link
Author

OK, I lowered the log level to 0 by changing config.php. And re-ran.

xxxxxxxx yes it's just /[a-z]+/ same for yyy (username)

Here's the logs:

{"reqId":"RHQh0pq3SIOF4LOI01rS","level":0,"time":"2020-03-16T12:13:22+00:00","remoteAddr":"81.174.169.217","user":"yyyyyyy","app":"no app in context","method":"MKCOL","url":"/remote.php/dav/calendars/yyyyyyy/xxxxxuk","message":"Deprecated event type for \\OCA\\DAV\\CalDAV\\CalDavBackend::createSubscription: Symfony\\Component\\EventDispatcher\\GenericEvent","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0","version":"18.0.2.2"}
{"reqId":"RHQh0pq3SIOF4LOI01rS","level":0,"time":"2020-03-16T12:13:22+00:00","remoteAddr":"81.174.169.217","user":"yyyyyyy","app":"no app in context","method":"MKCOL","url":"/remote.php/dav/calendars/yyyyyyy/xxxxxuk","message":"Deprecated event type for \\OCA\\DAV\\CalDAV\\CalDavBackend::createCachedCalendarObject: Symfony\\Component\\EventDispatcher\\GenericEvent","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0","version":"18.0.2.2"}
{"reqId":"ZdbVbdJJ624GVhIcLAXH","level":0,"time":"2020-03-16T12:13:22+00:00","remoteAddr":"81.174.169.217","user":"yyyyyyy","app":"webdav","method":"REPORT","url":"/remote.php/dav/calendars/yyyyyyy/xxxxxuk/","message":{"Exception":"Sabre\\DAV\\Exception\\NotFound","Message":"Calendar object not found","Code":0,"Trace":[{"file":"/var/www/safe.xxxxx.uk/3rdpyyyyyyyy/sabre/dav/lib/DAV/Tree.php","line":76,"function":"getChild","class":"OCA\\DAV\\CalDAV\\CachedSubscription","type":"->","args":["\"xto"]},{"file":"/var/www/safe.xxxxx.uk/3rdpyyyyyyyy/sabre/dav/lib/DAV/Tree.php","line":71,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->","args":["calendars/yyyyyyy/xxxxxuk/\"xto"]},{"file":"/var/www/safe.xxxxx.uk/3rdpyyyyyyyy/sabre/dav/lib/DAV/Server.php","line":967,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->","args":["calendars/yyyyyyy/xxxxxuk/\"xto/dokentrk8270\".ics"]},{"function":"getPropertiesIteratorForPath","class":"Sabre\\DAV\\Server","type":"->","args":["calendars/yyyyyyy/xxxxxuk/\"xto/dokentrk8270\".ics",["{DAV:}getcontenttype","{DAV:}getetag","{DAV:}resourcetype","{DAV:}displayname","{DAV:}owner","{DAV:}sync-token","{DAV:}current-user-privilege-set","{urn:ietf:params:xml:ns:caldav}calendar-data"],0]},{"file":"/var/www/safe.xxxxx.uk/3rdpyyyyyyyy/sabre/dav/lib/DAV/Server.php","line":940,"function":"iterator_to_array","args":[{"__class__":"Generator"}]},{"file":"/var/www/safe.xxxxx.uk/3rdpyyyyyyyy/sabre/dav/lib/CalDAV/Plugin.php","line":629,"function":"getPropertiesForPath","class":"Sabre\\DAV\\Server","type":"->","args":["calendars/yyyyyyy/xxxxxuk/\"xto/dokentrk8270\".ics",["{DAV:}getcontenttype","{DAV:}getetag","{DAV:}resourcetype","{DAV:}displayname","{DAV:}owner","{DAV:}sync-token","{DAV:}current-user-privilege-set","{urn:ietf:params:xml:ns:caldav}calendar-data"]]},{"file":"/var/www/safe.xxxxx.uk/3rdpyyyyyyyy/sabre/dav/lib/CalDAV/Plugin.php","line":250,"function":"calendarQueryReport","class":"Sabre\\CalDAV\\Plugin","type":"->","args":[{"properties":["{DAV:}getcontenttype","{DAV:}getetag","{DAV:}resourcetype","{DAV:}displayname","{DAV:}owner","{DAV:}sync-token","{DAV:}current-user-privilege-set","{urn:ietf:params:xml:ns:caldav}calendar-data"],"filters":{"name":"VCALENDAR","is-not-defined":false,"comp-filters":[{"name":"VEVENT","is-not-defined":false,"comp-filters":[],"prop-filters":[],"time-range":{"styyyyyyy":{"date":"2020-02-24 00:00:00.000000","timezone_type":3,"timezone":"UTC","__class__":"DateTimeImmutable"},"end":{"date":"2020-04-05 23:00:00.000000","timezone_type":3,"timezone":"UTC","__class__":"DateTimeImmutable"}}}],"prop-filters":[],"time-range":false},"expand":null,"contentType":"text/calendar","version":"2.0","__class__":"Sabre\\CalDAV\\Xml\\Request\\CalendarQueryReport"}]},{"function":"report","class":"Sabre\\CalDAV\\Plugin","type":"->","args":["{urn:ietf:params:xml:ns:caldav}calendar-query",{"properties":["{DAV:}getcontenttype","{DAV:}getetag","{DAV:}resourcetype","{DAV:}displayname","{DAV:}owner","{DAV:}sync-token","{DAV:}current-user-privilege-set","{urn:ietf:params:xml:ns:caldav}calendar-data"],"filters":{"name":"VCALENDAR","is-not-defined":false,"comp-filters":[{"name":"VEVENT","is-not-defined":false,"comp-filters":[],"prop-filters":[],"time-range":{"styyyyyyy":{"date":"2020-02-24 00:00:00.000000","timezone_type":3,"timezone":"UTC","__class__":"DateTimeImmutable"},"end":{"date":"2020-04-05 23:00:00.000000","timezone_type":3,"timezone":"UTC","__class__":"DateTimeImmutable"}}}],"prop-filters":[],"time-range":false},"expand":null,"contentType":"text/calendar","version":"2.0","__class__":"Sabre\\CalDAV\\Xml\\Request\\CalendarQueryReport"},"calendars/yyyyyyy/xxxxxuk"]},{"file":"/var/www/safe.xxxxx.uk/3rdpyyyyyyyy/sabre/event/lib/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"OCA\\DAV\\CalDAV\\Plugin"},"report"],["{urn:ietf:params:xml:ns:caldav}calendar-query",{"properties":["{DAV:}getcontenttype","{DAV:}getetag","{DAV:}resourcetype","{DAV:}displayname","{DAV:}owner","{DAV:}sync-token","{DAV:}current-user-privilege-set","{urn:ietf:params:xml:ns:caldav}calendar-data"],"filters":{"name":"VCALENDAR","is-not-defined":false,"comp-filters":[{"name":"VEVENT","is-not-defined":false,"comp-filters":[],"prop-filters":[],"time-range":{"styyyyyyy":{"date":"2020-02-24 00:00:00.000000","timezone_type":3,"timezone":"UTC","__class__":"DateTimeImmutable"},"end":{"date":"2020-04-05 23:00:00.000000","timezone_type":3,"timezone":"UTC","__class__":"DateTimeImmutable"}}}],"prop-filters":[],"time-range":false},"expand":null,"contentType":"text/calendar","version":"2.0","__class__":"Sabre\\CalDAV\\Xml\\Request\\CalendarQueryReport"},"calendars/yyyyyyy/xxxxxuk"]]},{"file":"/var/www/safe.xxxxx.uk/3rdpyyyyyyyy/sabre/dav/lib/DAV/CorePlugin.php","line":718,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["report",["{urn:ietf:params:xml:ns:caldav}calendar-query",{"properties":["{DAV:}getcontenttype","{DAV:}getetag","{DAV:}resourcetype","{DAV:}displayname","{DAV:}owner","{DAV:}sync-token","{DAV:}current-user-privilege-set","{urn:ietf:params:xml:ns:caldav}calendar-data"],"filters":{"name":"VCALENDAR","is-not-defined":false,"comp-filters":[{"name":"VEVENT","is-not-defined":false,"comp-filters":[],"prop-filters":[],"time-range":{"styyyyyyy":{"date":"2020-02-24 00:00:00.000000","timezone_type":3,"timezone":"UTC","__class__":"DateTimeImmutable"},"end":{"date":"2020-04-05 23:00:00.000000","timezone_type":3,"timezone":"UTC","__class__":"DateTimeImmutable"}}}],"prop-filters":[],"time-range":false},"expand":null,"contentType":"text/calendar","version":"2.0","__class__":"Sabre\\CalDAV\\Xml\\Request\\CalendarQueryReport"},"calendars/yyyyyyy/xxxxxuk"]]},{"function":"httpReport","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"https://safe.xxxxx.uk/remote.php/dav/calendars/yyyyyyy/xxxxxuk/","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/safe.xxxxx.uk/3rdpyyyyyyyy/sabre/event/lib/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"Sabre\\DAV\\CorePlugin"},"httpReport"],[{"absoluteUrl":"https://safe.xxxxx.uk/remote.php/dav/calendars/yyyyyyy/xxxxxuk/","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/safe.xxxxx.uk/3rdpyyyyyyyy/sabre/dav/lib/DAV/Server.php","line":479,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["method:REPORT",[{"absoluteUrl":"https://safe.xxxxx.uk/remote.php/dav/calendars/yyyyyyy/xxxxxuk/","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/safe.xxxxx.uk/3rdpyyyyyyyy/sabre/dav/lib/DAV/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"https://safe.xxxxx.uk/remote.php/dav/calendars/yyyyyyy/xxxxxuk/","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/safe.xxxxx.uk/apps/dav/lib/Server.php","line":319,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/safe.xxxxx.uk/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/safe.xxxxx.uk/remote.php","line":165,"args":["/var/www/safe.xxxxx.uk/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/safe.xxxxx.uk/apps/dav/lib/CalDAV/CachedSubscription.php","Line":134,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0","version":"18.0.2.2"}

@artfulrobot
Copy link
Author

For now, here's a URL for that file https://artfulrobot.uk/lil/sample-ics-for-nextcloud-issue-fails.ics

@georgehrke
Copy link
Member

Moving to server, since this seems to be an issue in the dav app ...

@georgehrke georgehrke transferred this issue from nextcloud/calendar Mar 16, 2020
@georgehrke georgehrke added 1. to develop Accepted and waiting to be taken care of bug feature: dav labels Mar 16, 2020
@georgehrke georgehrke self-assigned this Mar 16, 2020
@georgehrke georgehrke changed the title External ICS calendars fail to display if the UID includes a / character Calendar Subscription collection not found, returns 404 instead Mar 16, 2020
@artfulrobot
Copy link
Author

Forgive the uninformed hunch - but it's not something like it's using the UID in a filename (and therefore cannot contain /)?

@georgehrke
Copy link
Member

georgehrke commented Mar 16, 2020

@georgehrke georgehrke changed the title Calendar Subscription collection not found, returns 404 instead External ICS calendars fail to display if the UID includes slash Mar 16, 2020
@artfulrobot

This comment has been minimized.

@georgehrke

This comment has been minimized.

@artfulrobot

This comment has been minimized.

@georgehrke
Copy link
Member

Pull-request: #19986

@georgehrke georgehrke added 3. to review Waiting for reviews and removed 1. to develop Accepted and waiting to be taken care of labels Mar 16, 2020
@artfulrobot
Copy link
Author

excellent, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants