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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user