summaryrefslogtreecommitdiffstats
path: root/aclk/aclk_otp.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-08-10 09:18:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-08-10 09:19:08 +0000
commita2d7dede737947d7c6afa20a88e1f0c64e0eb96c (patch)
treefed4aff7dbe0be00cf91de6261d98bc0eb9a2449 /aclk/aclk_otp.c
parentReleasing debian version 1.41.0-1. (diff)
downloadnetdata-a2d7dede737947d7c6afa20a88e1f0c64e0eb96c.tar.xz
netdata-a2d7dede737947d7c6afa20a88e1f0c64e0eb96c.zip
Merging upstream version 1.42.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'aclk/aclk_otp.c')
-rw-r--r--aclk/aclk_otp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/aclk/aclk_otp.c b/aclk/aclk_otp.c
index 46d0f6213..99b2adea2 100644
--- a/aclk/aclk_otp.c
+++ b/aclk/aclk_otp.c
@@ -414,6 +414,10 @@ int aclk_send_otp_response(const char *agent_id, const unsigned char *response,
aclk_parse_otp_error(resp.payload);
goto cleanup_response;
}
+ if (resp.payload_size == 0 || resp.payload == NULL) {
+ netdata_log_error("ACLK_OTP Password response payload is empty despite returning 201 Created!");
+ goto cleanup_response;
+ }
netdata_log_info("ACLK_OTP Got Password from Cloud");
if (parse_passwd_response(resp.payload, mqtt_auth)){