1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 05:16:38 +02:00

relay/api: reply HTTP 400 (Bad Request) when the body received is not a dict in websocket data

This commit is contained in:
Sébastien Helleu
2024-10-29 22:38:28 +01:00
parent 26e16fdea7
commit ad6ec011bd
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -25,6 +25,7 @@
- irc: fix crash on /list buffer when a filter is set ([#2197](https://github.com/weechat/weechat/issues/2197))
- exec: fix unexpected execution of command with `/exec -o` when the command starts with two command chars ([#2199](https://github.com/weechat/weechat/issues/2199))
- relay/api: fix empty nicklist in remote buffers after connection or reconnection
- relay/api: reply HTTP 400 (Bad Request) when the body received is not a dict in websocket data
- core: always send the signal "buffer_switch", even when the buffer is opening ([#2198](https://github.com/weechat/weechat/issues/2198))
- core: reload all plugins with command `/plugin reload *`
- lua: fix compilation on Fedora with Lua < 5.2.0 ([#2173](https://github.com/weechat/weechat/issues/2173), [#2174](https://github.com/weechat/weechat/issues/2174))
@@ -957,6 +957,8 @@ relay_api_protocol_recv_json_request (struct t_relay_client *client,
json_body = cJSON_GetObjectItem (json, "body");
if (json_body)
{
if (!cJSON_IsObject (json_body))
goto error;
string_body = cJSON_PrintUnformatted (json_body);
if (string_body)
{