Skip to content

Commit

Permalink
in_forward: fixed incorrect shared key length in authentication (#9551)
Browse files Browse the repository at this point in the history
---------

Signed-off-by: Leonardo Alminana <[email protected]>
  • Loading branch information
leonardo-albertovich authored Nov 4, 2024
1 parent 652fa29 commit e28f447
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/in_forward/fw_prot.c
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,10 @@ static int user_authentication(struct flb_input_instance *ins,
continue;
}

if (password_digest_len != 128) {
continue;
}

userauth_digest = flb_calloc(128, sizeof(char));

if (flb_secure_forward_password_digest(ins, conn,
Expand Down Expand Up @@ -652,7 +656,7 @@ static int check_ping(struct flb_input_instance *ins,
return -1;
}

if (strncmp(serverside, shared_key_digest, shared_key_digest_len) != 0) {
if (strncmp(serverside, shared_key_digest, 128) != 0) {
flb_plg_error(ins, "shared_key mismatch");
flb_free(serverside);

Expand Down

0 comments on commit e28f447

Please sign in to comment.