Skip to content

Commit c15d1ab

Browse files
committed
C#: Consider an attribute to be authorization like, if it extends an attribute that has an authorization like name.
1 parent 2e7e276 commit c15d1ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

csharp/ql/lib/semmle/code/csharp/security/auth/MissingFunctionLevelAccessControlQuery.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ predicate hasAuthViaXml(ActionMethod m) {
8181

8282
/** Holds if the given action has an attribute that indications authorization. */
8383
predicate hasAuthViaAttribute(ActionMethod m) {
84-
exists(Attribute attr | attr.getType().getName().toLowerCase().matches("%auth%") |
84+
exists(Attribute attr | attr.getType().getABaseType*().getName().toLowerCase().matches("%auth%") |
8585
attr = m.getOverridee*().getAnAttribute() or
8686
attr = getAnUnboundBaseType*(m.getDeclaringType()).getAnAttribute()
8787
)

0 commit comments

Comments
 (0)