-
Notifications
You must be signed in to change notification settings - Fork 430
Open
Description
Description
MSC4140 delayed events in Synapse fail when the message body contains non‑ASCII characters, resulting in M_UNKNOWN instead of a valid delay_id response.
Steps to reproduce
Run the following curl command:
curl -v "https://matrix.server.ru/_matrix/client/v3/rooms/!room:server.ru/send/m.room.message/DaewooK2?org.matrix.msc4140.delay=60000" \
-X PUT \
-d '{"body":"Тест отложенной отправки сообщений в Synapse!","msgtype":"m.text"}'Expected Behavior
When sending a delayed event using MSC4140, the server should return a response like:
{"delay_id":"syd_akHesrlUxCRsJrXNojQW"}Actual Behavior
Instead, the server responds with:
{"errcode":"M_UNKNOWN","error":"Internal server error"}This occurs specifically when the message body contains Cyrillic characters.
Homeserver
Private HS
Synapse Version
v1.141.0
Installation Method
pip (from PyPI)
Database
PostgreSQL, single server, database not was ported from sqlite, no backups restored
Workers
Single process
Platform
Armbrian 25.8.0-trunk.411 (Debian 11), no containers.
Configuration
experimental_features:
msc4140_enabled: true
max_event_delay_duration: 365d
caches:
global_factor: 4.0
event_cache_size: 10000
response_cache_size: 5000
user_cache_size: 5000
room_cache_size: 3000
federation_cache_size: 3000
Relevant log output
2025-11-30 23:24:16,469 - synapse.access.http.8008 - 476 - DEBUG - PUT-4 - **** - 8008 - Received request: PUT /_matrix/client/v3/rooms/!room:server/ru/send/m.room.message/SamsungK9?org.matrix.msc4140.delay=3595000
2025-11-30 23:24:16,525 - synapse.access.http.8008 - 521 - INFO - PUT-4 - *** - 8008 - {@me:server.ru} Processed request: 0.054sec/0.002sec (0.017sec, 0.004sec) (0.005sec/0.029sec/6) 55B 500 "PUT /_matrix/client/v3/rooms/!room:server.ru/send/m.room.message/SamsungK9?org.matrix.msc4140.delay=3595000 HTTP/1.1" "curl/8.16.0" [0 dbevts]Anything else that would be useful to know?
- The issue seems related to handling of non‑ASCII (Cyrillic) characters in delayed events.
- Works as expected with plain ASCII text.
timofej673