summaryrefslogtreecommitdiffstats
path: root/aclk/aclk_otp.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-08-10 09:18:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-08-10 09:18:49 +0000
commitdd814a7c1a8de056a79f7238578b09236edd5506 (patch)
tree429e7eed5a634a4efe9a6877ce66da8e64aa1782 /aclk/aclk_otp.c
parentAdding upstream version 1.41.0. (diff)
downloadnetdata-dd814a7c1a8de056a79f7238578b09236edd5506.tar.xz
netdata-dd814a7c1a8de056a79f7238578b09236edd5506.zip
Adding upstream version 1.42.0.upstream/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)){