nextcloud / richdocuments

đź“‘ Collabora Online for Nextcloud
https://nextcloud.com/collaboraonline
355 stars 116 forks source link

FileID field too short #3703

Closed svenseeberg closed 6 months ago

svenseeberg commented 6 months ago

Describe the bug The fileid fields in the richdocuments_direct and richdocuments_wopi tables are of type int(11). The filecache table has type BIGINT(20). If there is a higher file ID than 2147483647, Collabora fails to load with:

An exception occurred while executing a query: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'fileid' at row 1

To Reproduce Steps to reproduce the behavior:

  1. Create a file with an ID > 2147483647
  2. Try to open the file in Collabora.
  3. The request to /apps/richdocuments/token throws an error 500
  4. Look into the nextcloud log file and find the SQL error

Expected behavior The richdocuments app should also use BIGINT(20) as type for the fileid field.

Screenshots none

Client details:

Server details

Operating system: Debian 12

Web server: Nginx 1.22.1-9

Database: MariaDB 1:10.11.6-0+deb12u1

PHP version: 8.2.18-1

Nextcloud version: 28.0.5.1

Version of the richdocuments app: 8.3.5

Version of Collabora Online: 23.05.11.1

Configuration of the richdocuments app

{
    "apps": {
        "richdocuments": {
            "disable_certificate_verification": "",
            "doc_format": "odf",
            "enabled": "yes",
            "installed_version": "8.3.5",
            "public_wopi_url": "https:\/\/collabora.example.com",
            "types": "prevent_group_restriction",
            "use_groups": "",
            "wopi_url": "https:\/\/collabora.example.com"
        }
    }
}
svenseeberg commented 6 months ago

Alright, seems to be fixed already with https://github.com/nextcloud/richdocuments/pull/1243#issuecomment-726686591