When sending a [video] message to the room via Matrix iOS SDK client to https://server_endpoint/_matrix/client/r0/rooms/!roomId:host/send/m.room.message/messageId with following request body:
{
"errcode": "M_BAD_JSON",
"error": "gomatrixserverlib: bad JSON: value is outside of safe range"
}
This suggests that the request body is invalid JSON -- at least according to the Canonical JSON Appendix.
I went ahead and verified the JSON grammar according to RFC7159 standard via https://jsonformatter.curiousconcept.com which successfully validated the JSON
![image](https://user-images.githubusercontent.com/5576161/114703208-47ddc880-9d25-11eb-8251-2366349821f7.png)
I decided to validate the JSON error myself with a custom go script which converts the request body JSON to byte array and validates it against gomatrixserverlib CanonicalJSON() and EnforcedCanonicalJSON().
This showed that the JSON is invalid in the case of the Room Version 6.
To my understanding this should't happen?
Desktop (please complete the following information):
macOS 11.3 Beta (20E5186d)
dendrite version
Smartphone (please complete the following information):
Device: iPhone XsMax
OS: iOS 14.2.2
Additional context
Go script for validating the failing request body can be found here
Problem
When sending a [video] message to the room via Matrix iOS SDK client to
https://server_endpoint/_matrix/client/r0/rooms/!roomId:host/send/m.room.message/messageId
with following request body:we get an unexpected error:
This suggests that the request body is invalid JSON -- at least according to the Canonical JSON Appendix.
I went ahead and verified the JSON grammar according to RFC7159 standard via https://jsonformatter.curiousconcept.com which successfully validated the JSON
![image](https://user-images.githubusercontent.com/5576161/114703208-47ddc880-9d25-11eb-8251-2366349821f7.png)I decided to validate the JSON error myself with a custom go script which converts the request body JSON to byte array and validates it against gomatrixserverlib CanonicalJSON() and EnforcedCanonicalJSON().
This showed that the JSON is invalid in the case of the
Room Version
6.To my understanding this should't happen?
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Go script for validating the failing request body can be found here