Skip to content

Commit

Permalink
in_splunk: splunk token validation must be case-insensitive, since th…
Browse files Browse the repository at this point in the history
…at's the behavior from Splunk HEC

Signed-off-by: lecaros <[email protected]>
  • Loading branch information
lecaros authored and edsiper committed Nov 14, 2024
1 parent f03baad commit c290f27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/in_splunk/splunk_prot.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ static int validate_auth_header(struct flb_splunk *ctx, struct mk_http_request *
continue;
}

if (strncmp(splunk_token->header,
if (strncasecmp(splunk_token->header,
authorization,
splunk_token->length) == 0) {
flb_sds_destroy(authorization);
Expand Down Expand Up @@ -1046,7 +1046,7 @@ static int validate_auth_header_ng(struct flb_splunk *ctx, struct flb_http_reque
return SPLUNK_AUTH_UNAUTHORIZED;
}

if (strncmp(splunk_token->header,
if (strncasecmp(splunk_token->header,
auth_header,
splunk_token->length) == 0) {
return SPLUNK_AUTH_SUCCESS;
Expand Down

0 comments on commit c290f27

Please sign in to comment.