### Description
## Issue Description
---
We are currently transitioning fro…m Etherpad to Hedgedoc as our primary note taking tool.
During the migration, we encountered an issue where copying and pasting bullet points from Etherpad into a Hedgedoc note, as well as uploading images, have been consistently resulting in a server crash.
As an example the following text always triggers a server crash :
```
Mysql extended version 3 salles sous bosh et non extended version en cours de migration sur k3s
```
For the images, they are correctly uploaded on the server before the crash, but not displayed when the server restart.
We have successfully used the migration tool for old notes, and although the final layout requires some adjustments, no crashes occurred during the migration process.
### Steps to reproduce
1. Copy the specified text or bullet points from an Etherpad document.
2. Attempt to paste it into a Hedgedoc note or upload an image to a note.
3. Observe that the server crashes upon performing these actions.
### Expected behaviour
Content from Etherpad should be pasted into Hedgedoc notes without causing server crashes, and image uploads should work as expected.
### Logs
```shell
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:19.547Z info: Executing (default): SELECT `sid`, `expires`, `data`, `createdAt`, `updatedAt` FROM `Sessions` AS `Session` WHERE `Session`.`sid` = 'olFtjwSmXX
U4_Q4DB9islT6X-SI4Xnbc';
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:19.547Z info: Executing (default): SELECT count(*) AS `count` FROM `Notes` AS `Note`;
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:19.550Z info: Executing (default): SELECT count(*) AS `count` FROM `Users` AS `User`;
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:19.551Z info: Executing (default): INSERT INTO `Sessions` (`sid`,`expires`,`data`,`createdAt`,`updatedAt`) VALUES (?,?,?,?,?);
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:19.552Z info: 10.16.18.69 - - [08/Nov/2023:13:49:19 +0000] "GET /status HTTP/1.1" 200 266 "-" "kube-probe/1.24"
hedgedoc-859b57d5cb-nq5qc
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:19.554Z info: 10.16.18.69 - - [08/Nov/2023:13:49:19 +0000] "GET /_health HTTP/1.1" 200 14 "-" "kube-probe/1.24"
hedgedoc-859b57d5cb-nq5qc
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:24.547Z info: Executing (default): SELECT count(*) AS `count` FROM `Notes` AS `Note`;
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:24.547Z info: Executing (default): SELECT `sid`, `expires`, `data`, `createdAt`, `updatedAt` FROM `Sessions` AS `Session` WHERE `Session`.`sid` = 'CL11YqZ2k4
f7ozsX5GlsM7gV30RfqlfE';
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:24.550Z info: Executing (default): SELECT count(*) AS `count` FROM `Users` AS `User`;
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:24.551Z info: Executing (default): INSERT INTO `Sessions` (`sid`,`expires`,`data`,`createdAt`,`updatedAt`) VALUES (?,?,?,?,?);
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:24.552Z info: 10.16.18.69 - - [08/Nov/2023:13:49:24 +0000] "GET /status HTTP/1.1" 200 266 "-" "kube-probe/1.24"
hedgedoc-859b57d5cb-nq5qc
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:24.553Z info: 10.16.18.69 - - [08/Nov/2023:13:49:24 +0000] "GET /_health HTTP/1.1" 200 14 "-" "kube-probe/1.24"
hedgedoc-859b57d5cb-nq5qc
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:27.485Z debug: SERVER received [a6825b47-7c22-45b7-b2d8-811d2d366af0] user status from [_h4At88jS-rBJ7vEAAAA]: {"idle":false,"type":"lg"}
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:29.546Z info: Executing (default): SELECT `sid`, `expires`, `data`, `createdAt`, `updatedAt` FROM `Sessions` AS `Session` WHERE `Session`.`sid` = 'Xwc2NHwCXX
YDsFRH9P2vMqrCxdmBqmYR';
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:29.547Z info: Executing (default): SELECT count(*) AS `count` FROM `Notes` AS `Note`;
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:29.550Z info: Executing (default): INSERT INTO `Sessions` (`sid`,`expires`,`data`,`createdAt`,`updatedAt`) VALUES (?,?,?,?,?);
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:29.551Z info: Executing (default): SELECT count(*) AS `count` FROM `Users` AS `User`;
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:29.552Z info: 10.16.18.69 - - [08/Nov/2023:13:49:29 +0000] "GET /status HTTP/1.1" 200 266 "-" "kube-probe/1.24"
hedgedoc-859b57d5cb-nq5qc
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:29.553Z info: 10.16.18.69 - - [08/Nov/2023:13:49:29 +0000] "GET /_health HTTP/1.1" 200 14 "-" "kube-probe/1.24"
hedgedoc-859b57d5cb-nq5qc
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:34.546Z info: Executing (default): SELECT `sid`, `expires`, `data`, `createdAt`, `updatedAt` FROM `Sessions` AS `Session` WHERE `Session`.`sid` = 'HXNfFq3oTG
cJFs_pjy1OPWlpJKWjT_MS';
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:34.547Z info: Executing (default): SELECT count(*) AS `count` FROM `Notes` AS `Note`;
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:34.550Z info: Executing (default): INSERT INTO `Sessions` (`sid`,`expires`,`data`,`createdAt`,`updatedAt`) VALUES (?,?,?,?,?);
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:34.550Z info: Executing (default): SELECT count(*) AS `count` FROM `Users` AS `User`;
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:34.552Z info: 10.16.18.69 - - [08/Nov/2023:13:49:34 +0000] "GET /status HTTP/1.1" 200 266 "-" "kube-probe/1.24"
hedgedoc-859b57d5cb-nq5qc
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:34.552Z info: 10.16.18.69 - - [08/Nov/2023:13:49:34 +0000] "GET /_health HTTP/1.1" 200 14 "-" "kube-probe/1.24"
hedgedoc-859b57d5cb-nq5qc
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:34.552Z info: 10.16.18.69 - - [08/Nov/2023:13:49:34 +0000] "GET /_health HTTP/1.1" 200 14 "-" "kube-probe/1.24"
hedgedoc-859b57d5cb-nq5qc
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:39.547Z info: Executing (default): SELECT `sid`, `expires`, `data`, `createdAt`, `updatedAt` FROM `Sessions` AS `Session` WHERE `Session`.`sid` = 'v9rM1YtDlM
R8fECzX95Xi7PUGDRUmGee';
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:39.547Z info: Executing (default): SELECT count(*) AS `count` FROM `Notes` AS `Note`;
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:39.550Z info: Executing (default): SELECT count(*) AS `count` FROM `Users` AS `User`;
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:39.550Z info: Executing (default): INSERT INTO `Sessions` (`sid`,`expires`,`data`,`createdAt`,`updatedAt`) VALUES (?,?,?,?,?);
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:39.552Z info: 10.16.18.69 - - [08/Nov/2023:13:49:39 +0000] "GET /status HTTP/1.1" 200 266 "-" "kube-probe/1.24"
hedgedoc-859b57d5cb-nq5qc
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:39.553Z info: 10.16.18.69 - - [08/Nov/2023:13:49:39 +0000] "GET /_health HTTP/1.1" 200 14 "-" "kube-probe/1.24"
hedgedoc-859b57d5cb-nq5qc
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:44.547Z info: Executing (default): SELECT count(*) AS `count` FROM `Notes` AS `Note`;
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:44.547Z info: Executing (default): SELECT `sid`, `expires`, `data`, `createdAt`, `updatedAt` FROM `Sessions` AS `Session` WHERE `Session`.`sid` = 'Z9JdDqQJ7G
tKmFY3l6TMnC99PRuJEcUT';
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:44.552Z info: Executing (default): SELECT count(*) AS `count` FROM `Users` AS `User`;
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:44.552Z info: Executing (default): INSERT INTO `Sessions` (`sid`,`expires`,`data`,`createdAt`,`updatedAt`) VALUES (?,?,?,?,?);
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:44.555Z info: 10.16.18.69 - - [08/Nov/2023:13:49:44 +0000] "GET /status HTTP/1.1" 200 266 "-" "kube-probe/1.24"
hedgedoc-859b57d5cb-nq5qc
hedgedoc-859b57d5cb-nq5qc 2023-11-08T13:49:44.558Z info: 10.16.18.69 - - [08/Nov/2023:13:49:44 +0000] "GET /_health HTTP/1.1" 200 14 "-" "kube-probe/1.24"
hedgedoc-859b57d5cb-nq5qc
Stream closed EOF for zz-test-hedgedoc-cnpg/hedgedoc-859b57d5cb-nq5qc (hedgedoc)
```
### Config
```shell
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: hedgedoc
spec:
interval: 3m
chart:
spec:
chart: charts/hedgedoc
version: 0.3.1
sourceRef:
kind: GitRepository
name: adfinis-helmcharts-git-repo
interval: 1m
values:
image:
tag: "1.9.9"
postgresql:
enabled: false
externalDatabase:
type: "mysql"
username: "XXX"
password: ${db_password}
host: ${db_host}
port: 3306
database: "XXX"
hedgedoc:
persistentStorage:
storageClass: "local-path"
env:
CMD_DOMAIN: hedgedoc.${cloudfoundry_ops_domain}
CMD_PROTOCOL_USESSL: true
CMD_DOCUMENT_MAX_LENGTH: 500000
CMD_ALLOW_FREEURL: true
CMD_DB_DIALECT: mariadb
CMD_DB_HOST: ${db_host}
CMD_DB_PORT: 3306
CMD_DB_DATABASE: XXX
CMD_DB_USERNAME: XXX
CMD_DB_PASSWORD: ${db_password}
CMD_LOGLEVEL: debug
DEBUG: true
## MariaDB
---
+--------------+-----------------------------------------+----------------------------+------------------------+----------+----------------+
| CATALOG_NAME | SCHEMA_NAME | DEFAULT_CHARACTER_SET_NAME | DEFAULT_COLLATION_NAME | SQL_PATH | SCHEMA_COMMENT |
+--------------+-----------------------------------------+----------------------------+------------------------+----------+----------------+
| def | information_schema | utf8mb3 | utf8mb3_general_ci | NULL | |
| def | cf_b7c7ea3f_bcbe_4c50_a9a6_888427c79d4d | utf8mb4 | utf8mb4_unicode_ci | NULL | |
+--------------+-----------------------------------------+----------------------------+------------------------+----------+----------------+
```
### Your Setup
- NodeJS version: v20.7.0
- MariaDB version: 10.6.10
- HedgeDoc version: 1.9.9
- Helm chart : https://artifacthub.io/packages/helm/adfinis/hedgedoc
- Helm chart version: 0.3.1
hedgedoc-0.3.1@sha1:2a36e588196b6b06e86c318e266dff8d0c96aece
The chart use the official docker image : https://quay.io/repository/hedgedoc/hedgedoc
as we can see here : https://github.com/adfinis/helm-charts/blob/44765d55692c21a7e08b34a88bafde6dfc69e4e2/charts/hedgedoc/values.yaml#L9
Same error encountered using this other chart :
https://artifacthub.io/packages/helm/truecharts/hedgedoc/9.0.9
### Additional context
More information about our intended use of hedgedoc : https://github.com/orange-cloudfoundry/paas-templates/issues/1979