File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
csharp/ql/lib/semmle/code/csharp/frameworks/microsoft Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -194,9 +194,16 @@ class MicrosoftAspNetCoreMvcControllerBaseClass extends Class {
194
194
}
195
195
}
196
196
197
- /** A subtype of `Microsoft.AspNetCore.Mvc.Controller` or `Microsoft.AspNetCore.Mvc.ControllerBase`. */
197
+ /** A valid ASP.NET Core controller according to https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/actions?view=aspnetcore-3.1 */
198
198
class MicrosoftAspNetCoreMvcController extends Class {
199
199
MicrosoftAspNetCoreMvcController ( ) {
200
+ exists ( Assembly a , string name |
201
+ a .getName ( ) = name and
202
+ (
203
+ name = "Microsoft.AspNetCore.Mvc.Core" or
204
+ name = "Microsoft.AspNetCore.Mvc.ViewFeatures"
205
+ )
206
+ ) and
200
207
(
201
208
this .getABaseType * ( ) instanceof MicrosoftAspNetCoreMvcControllerBaseClass or
202
209
this .getABaseType * ( ) .getName ( ) .matches ( "%Controller" ) or
You can’t perform that action at this time.
0 commit comments