Skip to content

Commit e28f447

Browse files
in_forward: fixed incorrect shared key length in authentication (#9551)
--------- Signed-off-by: Leonardo Alminana <[email protected]>
1 parent 652fa29 commit e28f447

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugins/in_forward/fw_prot.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,10 @@ static int user_authentication(struct flb_input_instance *ins,
495495
continue;
496496
}
497497

498+
if (password_digest_len != 128) {
499+
continue;
500+
}
501+
498502
userauth_digest = flb_calloc(128, sizeof(char));
499503

500504
if (flb_secure_forward_password_digest(ins, conn,
@@ -652,7 +656,7 @@ static int check_ping(struct flb_input_instance *ins,
652656
return -1;
653657
}
654658

655-
if (strncmp(serverside, shared_key_digest, shared_key_digest_len) != 0) {
659+
if (strncmp(serverside, shared_key_digest, 128) != 0) {
656660
flb_plg_error(ins, "shared_key mismatch");
657661
flb_free(serverside);
658662

0 commit comments

Comments
 (0)