fix: RequestValidator thread-safety#1
Merged
Swimburger merged 4 commits intoSwimburger:optimize-request-validationfrom Jan 3, 2023
benmccallum:patch-1
Merged
fix: RequestValidator thread-safety#1Swimburger merged 4 commits intoSwimburger:optimize-request-validationfrom benmccallum:patch-1
Swimburger merged 4 commits intoSwimburger:optimize-request-validationfrom
benmccallum:patch-1
Conversation
Relates to twilio#466 Turns out this may just be for correctness, as these algos may not hold onto any unmanaged resources. dotnet/aspnetcore#32871
8 tasks
Owner
Author
|
Without modifications, this code improves the performance but slightly increases the allocations for the unhappy path.
|
Swimburger
added a commit
that referenced
this pull request
Dec 31, 2022
Owner
Author
|
Using the mentioned one-shot alternative for .NET 6 and up (
Tested on optimize-request-validation-thread-safe branch. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.
Fixes twilio#466
Fixes
Makes RequestValidator thread-safe by not holding on to instances of the crypto algos used and instead new'ing them up and disposing of them per validation.
Checklist
If you have questions, please file a support ticket, or create a GitHub Issue in this repository.