matrix-org / matrix-appservice-irc

Node.js IRC bridge for Matrix
Apache License 2.0
465 stars 151 forks source link

IRC bridges make `/join` and `/leave` requests with a malformed body #1583

Closed richvdh closed 1 year ago

richvdh commented 2 years ago

We see lots of this on requests to POST /_matrix/client/r0/join/{roomId} and POST /_matrix/client/r0/rooms/{roomId}/leave from the IRC bridges:

2022-07-26 00:01:39,758 - synapse.http.servlet - 663 - WARNING - POST-73077 - Unable to parse JSON: Expecting value: line 1 column 1 (char 0) (b'')

... which suggests it is making requests with a malformed (empty?) body. Currently Synapse accepts this, but it's not spec-compliant and we'll be fixing this in Synapse soon: https://github.com/matrix-org/synapse/issues/13388.

Please could you make sure to include (at least) an empty json object in the request body?

Half-Shot commented 2 years ago

These requests are handled by matrix-bot-sdk, so it's possible that library is buggy. Will take a look.

Half-Shot commented 2 years ago

Opened https://github.com/turt2live/matrix-bot-sdk/issues/248 to track the upstream bug

Half-Shot commented 1 year ago

Believe this has been fixed for a while.