Skip to content

Commit 1f2f2ff

Browse files
committed
C#: Update testcases with examples.
1 parent e1c7003 commit 1f2f2ff

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

csharp/ql/test/library-tests/dataflow/flowsources/aspremote/AspRemoteFlowSource.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ namespace Testing
55

66
public class ViewModel
77
{
8-
public string RequestId { get; set; }
9-
10-
public object Query;
8+
public string RequestId { get; set; } // Considered tainted.
9+
public object RequestIdField; // Not considered tainted as it is a field.
10+
public string RequestIdOnlyGet { get; } // Not considered tainted as there is no setter.
11+
public string RequestIdPrivateSet { get; private set; } // Not considered tainted as it has a private setter.
12+
public static object RequestIdStatic { get; set; } // Not considered tainted as it is static.
13+
private string RequestIdPrivate { get; set; } // Not considered tainted as it is private.
1114
}
1215

1316
public class TestController : Controller
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
remoteFlowSourceMembers
22
| AspRemoteFlowSource.cs:8:23:8:31 | RequestId |
3-
| AspRemoteFlowSource.cs:10:23:10:27 | Query |
43
remoteFlowSources
5-
| AspRemoteFlowSource.cs:15:42:15:50 | viewModel |
4+
| AspRemoteFlowSource.cs:18:42:18:50 | viewModel |

0 commit comments

Comments
 (0)