Skip to content

Commit a687483

Browse files
authored
Merge pull request #42 from rubberduck-vba/webhook
Webhook: fix exception with stream reader
2 parents 8be4973 + 478782e commit a687483

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rubberduckvba.Server/GitHubAuthenticationHandler.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ protected async override Task<AuthenticateResult> HandleAuthenticateAsync()
7575
}
7676

7777
var signature = xHubSignature256.SingleOrDefault();
78-
var payload = new StreamReader(Context.Request.Body).ReadToEnd();
78+
79+
using var reader = new StreamReader(Context.Request.Body);
80+
var payload = reader.ReadToEndAsync().GetAwaiter().GetResult();
7981

8082
if (!IsValidSignature(signature, payload))
8183
{

0 commit comments

Comments
 (0)