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,7 +194,11 @@ class MicrosoftAspNetCoreMvcControllerBaseClass extends Class {
194
194
}
195
195
}
196
196
197
- /** A valid ASP.NET Core controller according to https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/actions?view=aspnetcore-3.1 */
197
+ /**
198
+ * A valid ASP.NET Core controller according to:
199
+ * https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/actions?view=aspnetcore-3.1
200
+ * https://github.com/dotnet/aspnetcore/blob/b3c93967ba508b8ef139add27132d9483c1a9eb4/src/Mvc/Mvc.Core/src/Controllers/ControllerFeatureProvider.cs#L39-L75
201
+ */
198
202
class MicrosoftAspNetCoreMvcController extends Class {
199
203
MicrosoftAspNetCoreMvcController ( ) {
200
204
exists ( Assembly a , string name |
@@ -204,6 +208,9 @@ class MicrosoftAspNetCoreMvcController extends Class {
204
208
name = "Microsoft.AspNetCore.Mvc.ViewFeatures"
205
209
)
206
210
) and
211
+ this .isPublic ( ) and
212
+ not this .isAbstract ( ) and
213
+ not this .containsTypeParameters ( ) and
207
214
(
208
215
this .getABaseType * ( ) instanceof MicrosoftAspNetCoreMvcControllerBaseClass or
209
216
this .getABaseType * ( ) .getName ( ) .matches ( "%Controller" ) or
You can’t perform that action at this time.
0 commit comments