-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release/8.0] Add namespace and assembly check before interception #51276
Conversation
Hi @github-actions[bot]. This PR was just approved to be included in the upcoming servicing release. Somebody from the @dotnet/aspnet-build team will get it merged when the branches are open. Until then, please make sure all the CI checks pass and the PR is reviewed. |
Approved via email. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking question.
src/Http/Http.Extensions/gen/StaticRouteHandlerModel/InvocationOperationExtensions.cs
Show resolved
Hide resolved
Does not seem to have been included in the initial public release of dotnet 8. |
Hi @jeremy-allocate. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context. |
I see your comment on the other issue. That one deals particularly with the exception occurring in our analyzers. The fix here only applied to the Request Delegate Generator (which is off by default). TY for flagging this. |
Backport of #51243 to release/8.0
/cc @captainsafia
Add namespace and assembly check before interception
Resolves an issue where the Request Delegate Generator would inadvertently intercept methods that looks like the targeted
Map{Verb}
methods from the framework but were not. For example:Description
Adds a check to verify that the intercepted method is defined in our frameworks assemblies and namespace to avoid intercepting unexpected methods.
Fixes #51233
Customer Impact
Without this bug fix, customer code might inadvertently register interceptors due to the greedy nature of the check we use to confirm if an invocation if one that should be intercepted. Although the number of impacted users is likely low, there is no workaround and the fix contributes to the overall hardening of our source generator.
Regression?
Risk
Low risk because the impacted segments are small and the change makes the codebase more restrictive than previously.
Verification
Packaging changes reviewed?