Skip to content

Commit 84e93e2

Browse files
committed
C#: Add another test for MissingAccessControl.ql
1 parent cdd6245 commit 84e93e2

File tree

1 file changed

+8
-0
lines changed
  • csharp/ql/test/query-tests/Security Features/CWE-285/MissingAccessControl/MVCTests

1 file changed

+8
-0
lines changed

csharp/ql/test/query-tests/Security Features/CWE-285/MissingAccessControl/MVCTests/ProfileController.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ public ActionResult Delete4(int id)
4141
doThings();
4242
return View();
4343
}
44+
45+
// GOOD: The Authorize attribute is used.
46+
[Authorize("foo")]
47+
public ActionResult Delete5(int id)
48+
{
49+
doThings();
50+
return View();
51+
}
4452
}
4553

4654
[Authorize]

0 commit comments

Comments
 (0)