-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(x-pack/filebeat/input/http_endpoint): hmac header validation (#42756
) (#42759) The HMAC signature validation code had an optimization intended to return early when the configured HMAC header was not present in the request. However, it was checking the wrong variable for emptiness, which effectively skipped this check. If a request included an empty HMAC header, the HMAC signature check would still proceed and fail due to the missing or incorrect signature. This issue has been corrected by this commit. The code now returns `errMissingHMACHeader` only when the header is truly absent (not present rather than having an empty value). Additionally, before decoding the signature, a check for an empty value is added to return a descriptive error. (cherry picked from commit a74865b) Co-authored-by: Andrew Kroh <[email protected]>
- Loading branch information
1 parent
097041c
commit 4d00574
Showing
3 changed files
with
89 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters