Open punkyard opened 1 month ago
I stumbled upon a similiar issue and just post my findings here instead of making a new bug report.
The issue is that postgres does not allow NUL bytes in TEXT fields, however, CustomPropertiesBackend uses serialize
to store non scalar values. Sabre's ResourceType has a private field in it, and serialize
documentation states:
Object's private members have the class name prepended to the member name; protected members have a '*' prepended to the member name. These prepended values have null bytes on either side.
Also,
Note that this is a binary string which may include null bytes, and needs to be stored and handled as such. For example, serialize() output should generally be stored in a BLOB field in a database, rather than a CHAR or TEXT field.
The problem now is that we try to store that serialized value as-is, which Postgres doesn't support. One way to fix it would be to store non-text values base64 encoded, or alternatively, change the type of propertyvalue
from TEXT to BLOB (or BYTEA) and store normal text as UTF-8 encoded blob and objects as-is.
Obviously this would require a database migration.
hi @joshtrichards thanks for your reply
I have looked at #37754 and it seems to be about column type when this issue here could be considered as a quantity error what do you think?
Also experiencing this issue. I'm running Nextcloud Hub 9 (30.0.0) though the docker image Nextcloud AIO v9.6.0.
I see the below message spammed a ton of times in my log, right after I added my subscribed to my Nextcloud calendar via URL to a Google calendar.
[PHP] Error: unserialize(): Error at offset 61 of 64 bytes at /var/www/html/apps/dav/lib/DAV/CustomPropertiesBackend.php#560
PROPFIND /remote.php/dav/calendars/[USER_REDACTED]/
from [IP_REDACTED] by [USER_REDACTED] at Oct 10, 2024, 7:13:59 PM
⚠️ This issue respects the following points: ⚠️
Bug description
Hi I would like to report a repeated error I can find in NC logs. I'm afraid I can't evaluate its consequences, many errors arrived at the same time: locked files, antivirus, SQL and redis server.
Steps to reproduce
find logs in NC Logging:
Expected behavior
no error
Nextcloud Server version
29
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.2
Web server
Nginx
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
Updated from a MINOR version (ex. 28.0.1 to 28.0.2)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs