diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2024-03-10 10:16:31 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2024-03-12 20:37:48 +0100 |
commit | 59c977ddc9e5f7fdaa3a0dc0606ba86af8d7b941 (patch) | |
tree | 9066873e93816d13f360bfb199429503685335f8 /src/plugins | |
parent | 4f9bcc73ca93194b59f41aca844e6cc22172e241 (diff) | |
download | weechat-59c977ddc9e5f7fdaa3a0dc0606ba86af8d7b941.zip |
relay/api: check that "request" field is a string in JSON received (websocket connection)
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/relay/api/relay-api-protocol.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/relay/api/relay-api-protocol.c b/src/plugins/relay/api/relay-api-protocol.c index 83be148c1..0cf6b8055 100644 --- a/src/plugins/relay/api/relay-api-protocol.c +++ b/src/plugins/relay/api/relay-api-protocol.c @@ -682,6 +682,9 @@ relay_api_protocol_recv_json (struct t_relay_client *client, const char *json) if (!json_request) goto error; + if (!cJSON_IsString (json_request)) + goto error; + if (!relay_http_parse_method_path (client->http_req, cJSON_GetStringValue (json_request))) { |