api-snippets icon indicating copy to clipboard operation
api-snippets copied to clipboard

C# ValidateTwilioRequestAttribute check flipped?

Open c17r opened this issue 4 years ago • 0 comments

Perhaps I'm misunderstanding, but this line: https://github.com/TwilioDevEd/api-snippets/blob/2855c5c8215dbb5ce30f0fe19368aed22d7767bb/guides/request-validation-csharp-core/example-3/example-3.cs#L32

Shouldn't that be if (!IsValidRequest(context.Request) && !IsTestEnvironment)? If the request is not valid and we're not in the test environment, then give the 403.

c17r avatar Oct 02 '20 22:10 c17r