nextcloud / calendar

📆 Calendar app for Nextcloud
https://apps.nextcloud.com/apps/calendar
GNU Affero General Public License v3.0
952 stars 235 forks source link

Calendar app doesn't respect folding content lines #3229

Open mentalinc opened 3 years ago

mentalinc commented 3 years ago

The Caldav server does not appear to comply with RFC-5545 Content Lines.

Lines of text SHOULD NOT be longer than 75 octets, excluding the line break. Long content lines SHOULD be split into a multiple line representations using a line "folding" technique. That is, a long line can be split between any two characters by inserting a CRLF immediately followed by a single linear white-space character (i.e., SPACE or HTAB). Any sequence of CRLF followed immediately by a single linear white-space character is ignored (i.e., removed) when processing the content type.

https://icalendar.org/iCalendar-RFC-5545/3-1-content-lines.html

ics files that are valid and have had the "folding" technique applied, do not load correctly.

Steps to reproduce

  1. Create an RFC 5545 compliant Content line (less than 75 chars)
  2. Upload to the server (I've shared the .ics file and used subscribe to the file using the /download at the end of the url
  3. The calendar does not present the file correct with the rest of the "folded" lines cut off.

Expected behaviour

The files are correct folded and unfolded per the RFC

DESCRIPTION:This is a long description that exists on a long line. Can be represented as:

  DESCRIPTION:This is a lo
   ng description
    that exists on a long line.

And should be displayed in the calendar as "This is a long description that exists on a long line"

Actual behaviour

Calendar displays "This is a lo" as the event description.

Server configuration

Operating system: ubuntu 21.04.2

Web server Apache:

Database: MariaDB

PHP version: 7

Nextcloud version: 21.0.2 (see Nextcloud admin page)

Updated from an older Nextcloud/ownCloud or fresh install: yes, been updated from early Nextcloud version

Where did you install Nextcloud from: apt-get

Signing status:

Signing status ``` Login as admin user into your Nextcloud and access http://example.com/index.php/settings/integrity/failed ``` No errors have been found. ``` If you have access to your command line run e.g.: sudo -u www-data php occ app:list from within your Nextcloud installation folder ``` Enabled: - accessibility: 1.7.0 - activity: 2.14.3 - admin_audit: 1.11.0 - bruteforcesettings: 2.1.0 - calendar: 2.2.2 - circles: 0.21.2 - cloud_federation_api: 1.4.0 - comments: 1.11.0 - contactsinteraction: 1.2.0 - dashboard: 7.1.0 - dav: 1.17.1 - deck: 1.4.2 - federatedfilesharing: 1.11.0 - federation: 1.11.0 - files: 1.16.0 - files_antivirus: 3.2.1 - files_pdfviewer: 2.1.0 - files_rightclick: 1.0.0 - files_sharing: 1.13.1 - files_trashbin: 1.11.0 - files_versions: 1.14.0 - files_videoplayer: 1.10.0 - firstrunwizard: 2.10.0 - limit_login_to_ip: 3.1.0 - logreader: 2.6.0 - lookup_server_connector: 1.9.0 - mail: 1.9.5 - news: 15.4.5 - nextcloud_announcements: 1.10.0 - notes: 4.0.4 - notifications: 2.9.0 - oauth2: 1.9.0 - password_policy: 1.11.0 - photos: 1.3.0 - privacy: 1.5.0 - provisioning_api: 1.11.0 - recommendations: 1.0.0 - serverinfo: 1.11.0 - settings: 1.3.0 - sharebymail: 1.11.0 - spreed: 11.2.2 - support: 1.4.0 - survey_client: 1.9.0 - systemtags: 1.11.0 - text: 3.2.0 - theming: 1.12.0 - twofactor_backupcodes: 1.10.0 - twofactor_totp: 6.0.0 - updatenotification: 1.11.0 - user_status: 1.1.1 - viewer: 1.5.0 - weather_status: 1.1.0 - workflowengine: 2.3.0 Disabled: - carnet - encryption - files_accesscontrol - files_external - maps - registration - user_ldap **Nextcloud configuration:**
Config report ``` If you have access to your command line run e.g.: sudo -u www-data php occ config:list system from within your Nextcloud installation folder or Insert your config.php content here. Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …) ```
"system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ ***REMOVED SENSITIVE VALUE*** ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "overwrite.cli.url": "https:\/\/DOMAIN\/", "htaccess.RewriteBase": "\/", "dbtype": "mysql", "version": "21.0.2.1", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "logtimezone": "NZDT", "installed": true, "versions_retention_obligation": "auto,120", "trashbin_retention_obligation": "30,90", "updater.release.channel": "stable", "maintenance": false, "memcache.distributed": "\\OC\\Memcache\\Redis", "memcache.local": "\\OC\\Memcache\\APCu", "memcache.locking": "\\OC\\Memcache\\Redis", "filelocking.enabled": "true", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 0, "timeout": 0 }, "theme": "", "loglevel": 0, "mail_smtpmode": "smtp", "mail_smtpsecure": "tls", "mail_smtpauthtype": "LOGIN", "mail_smtpport": "587", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpauth": 1, "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "twofactor_enforced": "true", "twofactor_enforced_groups": [ "admin" ], "twofactor_enforced_excluded_groups": [], "mysql.utf8mb4": true, "app_install_overwrite": [ "limit_login_to_ip", "spreed", "files_accesscontrol", "circles", "bruteforcesettings" ], "has_rebuilt_cache": true, "preview_max_x": "2048", "preview_max_y": "2048", "jpeg_quality": "60", "mail_sendmailmode": "smtp", "default_phone_region": "COUNTRY" } } **Are you using external storage, NO **Are you using encryption:** no **Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/... No #### LDAP configuration (delete this part if not used)
LDAP config ``` With access to your command line run e.g.: sudo -u www-data php occ ldap:show-config from within your Nextcloud installation folder Without access to your command line download the data/owncloud.db to your local computer or access your SQL server remotely and run the select query: SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap'; Eventually replace sensitive data as the name/IP-address of your LDAP server or groups. ```
### Client configuration **Browser:** **Operating system:** ### Logs #### Web server error log
Web server error log ``` Insert your webserver log here ```
#### Nextcloud log (data/nextcloud.log)
Nextcloud log ``` Insert your Nextcloud log here ```
#### Browser log
Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```
tcitworld commented 3 years ago

Since this is only an issue with the calendar app UI, moving to the right repo.

The issue probably lies in calendar-js, need to pinpoint the exact place.

At least ical.js understands it properly https://mozilla-comm.github.io/ical.js/validator.html

mentalinc commented 3 years ago

Thanks. It looks like it may be in the file : /master/src/components/calendarComponent.js There is a reference to the RFC, but I can't see anything in the methods that do the "folding." OR /master/src/parsers/icalendarParser.js appears to be a parser in the code base, again I can't see anything doing the "folding"