Add agent version during ACLK handshake (#19583)
Add agent_version to the challegne response
Stelios Fragkakis committed
Feb 7, 2025 at 17:17 UTC
963bd01f85157466f631c6b87fdcc1d4a77b38f3
1 file changed
+1
-1
src/aclk/aclk_otp.c
+1
-1
@@ -368,7 +368,7 @@ static https_client_resp_t aclk_send_otp_response(const char *agent_id, const un
368
BUFFER *resp_json = buffer_create(strlen(OTP_URL_PREFIX) + UUID_STR_LEN + 20, &netdata_buffers_statistics.buffers_aclk);
369
370
buffer_sprintf(url, "%s/node/%s/password", target->path, agent_id);
371
- buffer_sprintf(resp_json, "{\"response\":\"%s\"}", base64);
371
+ buffer_sprintf(resp_json, "{\"agent_version\":\"%s\", \"response\":\"%s\"}", NETDATA_VERSION, base64);
372
373
req.url = (char *)buffer_tostring(url);
374
req.payload = (char *)buffer_tostring(resp_json);