Skip to content

Commit 191658f

Browse files
committed
C#: Update expected test output.
1 parent b2b1a3e commit 191658f

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

csharp/ql/test/query-tests/Security Features/CWE-117/LogForging.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public void ProcessRequest(HttpContext ctx)
2323
logger.Warn(username.Replace(Environment.NewLine, "") + " logged in");
2424
// GOOD: New-lines removed
2525
logger.Warn(username.Replace(Environment.NewLine, "", StringComparison.InvariantCultureIgnoreCase) + " logged in");
26-
// GOOD: New-lines replaced (False positive)
26+
// GOOD: New-lines replaced
2727
logger.Warn(username.ReplaceLineEndings("") + " logged in");
2828
// GOOD: Html encoded
2929
logger.Warn(WebUtility.HtmlEncode(username) + " logged in");

csharp/ql/test/query-tests/Security Features/CWE-117/LogForging.expected

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,23 @@
11
#select
22
| LogForging.cs:21:21:21:43 | ... + ... | LogForging.cs:18:27:18:49 | access to property QueryString : NameValueCollection | LogForging.cs:21:21:21:43 | ... + ... | This log entry depends on a $@. | LogForging.cs:18:27:18:49 | access to property QueryString | user-provided value |
3-
| LogForging.cs:27:21:27:66 | ... + ... | LogForging.cs:18:27:18:49 | access to property QueryString : NameValueCollection | LogForging.cs:27:21:27:66 | ... + ... | This log entry depends on a $@. | LogForging.cs:18:27:18:49 | access to property QueryString | user-provided value |
43
| LogForging.cs:31:50:31:72 | ... + ... | LogForging.cs:18:27:18:49 | access to property QueryString : NameValueCollection | LogForging.cs:31:50:31:72 | ... + ... | This log entry depends on a $@. | LogForging.cs:18:27:18:49 | access to property QueryString | user-provided value |
54
| LogForging.cs:35:26:35:33 | access to local variable username | LogForging.cs:18:27:18:49 | access to property QueryString : NameValueCollection | LogForging.cs:35:26:35:33 | access to local variable username | This log entry depends on a $@. | LogForging.cs:18:27:18:49 | access to property QueryString | user-provided value |
65
| LogForgingAsp.cs:12:21:12:43 | ... + ... | LogForgingAsp.cs:8:32:8:39 | username : String | LogForgingAsp.cs:12:21:12:43 | ... + ... | This log entry depends on a $@. | LogForgingAsp.cs:8:32:8:39 | username | user-provided value |
76
edges
87
| LogForging.cs:18:16:18:23 | access to local variable username : String | LogForging.cs:21:21:21:43 | ... + ... | provenance | |
9-
| LogForging.cs:18:16:18:23 | access to local variable username : String | LogForging.cs:27:21:27:28 | access to local variable username : String | provenance | |
108
| LogForging.cs:18:16:18:23 | access to local variable username : String | LogForging.cs:31:50:31:72 | ... + ... | provenance | |
119
| LogForging.cs:18:16:18:23 | access to local variable username : String | LogForging.cs:35:26:35:33 | access to local variable username | provenance | |
1210
| LogForging.cs:18:27:18:49 | access to property QueryString : NameValueCollection | LogForging.cs:18:16:18:23 | access to local variable username : String | provenance | |
1311
| LogForging.cs:18:27:18:49 | access to property QueryString : NameValueCollection | LogForging.cs:18:27:18:61 | access to indexer : String | provenance | MaD:1 |
1412
| LogForging.cs:18:27:18:61 | access to indexer : String | LogForging.cs:18:16:18:23 | access to local variable username : String | provenance | |
15-
| LogForging.cs:27:21:27:28 | access to local variable username : String | LogForging.cs:27:21:27:51 | call to method ReplaceLineEndings : String | provenance | MaD:2 |
16-
| LogForging.cs:27:21:27:51 | call to method ReplaceLineEndings : String | LogForging.cs:27:21:27:66 | ... + ... | provenance | |
1713
| LogForgingAsp.cs:8:32:8:39 | username : String | LogForgingAsp.cs:12:21:12:43 | ... + ... | provenance | |
1814
models
1915
| 1 | Summary: System.Collections.Specialized; NameValueCollection; false; get_Item; (System.String); ; Argument[this]; ReturnValue; taint; df-generated |
20-
| 2 | Summary: System; String; false; ReplaceLineEndings; (System.String); ; Argument[this]; ReturnValue; taint; df-generated |
2116
nodes
2217
| LogForging.cs:18:16:18:23 | access to local variable username : String | semmle.label | access to local variable username : String |
2318
| LogForging.cs:18:27:18:49 | access to property QueryString : NameValueCollection | semmle.label | access to property QueryString : NameValueCollection |
2419
| LogForging.cs:18:27:18:61 | access to indexer : String | semmle.label | access to indexer : String |
2520
| LogForging.cs:21:21:21:43 | ... + ... | semmle.label | ... + ... |
26-
| LogForging.cs:27:21:27:28 | access to local variable username : String | semmle.label | access to local variable username : String |
27-
| LogForging.cs:27:21:27:51 | call to method ReplaceLineEndings : String | semmle.label | call to method ReplaceLineEndings : String |
28-
| LogForging.cs:27:21:27:66 | ... + ... | semmle.label | ... + ... |
2921
| LogForging.cs:31:50:31:72 | ... + ... | semmle.label | ... + ... |
3022
| LogForging.cs:35:26:35:33 | access to local variable username | semmle.label | access to local variable username |
3123
| LogForgingAsp.cs:8:32:8:39 | username : String | semmle.label | username : String |

0 commit comments

Comments
 (0)