Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Commit

Permalink
Lowercase webhooks digest header value (#2471)
Browse files Browse the repository at this point in the history
Co-authored-by: stas <statis@microsoft.com>
  • Loading branch information
stishkin and stas authored Sep 30, 2022
1 parent 2155c48 commit 969701a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ApiService/ApiService/onefuzzlib/WebhookOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ public async Async.Task<bool> Send(WebhookMessageLog messageLog) {
var headers = new Dictionary<string, string> { { "User-Agent", $"onefuzz-webhook {_context.ServiceConfiguration.OneFuzzVersion}" } };

if (digest != null) {
headers["X-Onefuzz-Digest"] = digest;
//make sure digest is lowercase to be backwards compatible with Python webhooks
headers["X-Onefuzz-Digest"] = digest.ToLowerInvariant();
}

using var httpClient = _httpFactory.CreateClient();
Expand Down

0 comments on commit 969701a

Please sign in to comment.