mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 22:06: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:
@@ -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