Skip to content

Commit 12cda86

Browse files
authored
Merge pull request #19826 from hvitved/csharp/function-auth-test
C#: Add another test for `MissingAccessControl.ql`
2 parents 23c449f + 84e93e2 commit 12cda86

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)