Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6301e72

Browse files
committed
C#: Update HttpServerUtility stub with HtmlEncode method and update flow summaries test.
1 parent 1cd37dd commit 6301e72

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

csharp/ql/test/library-tests/dataflow/library/FlowSummaries.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2218,6 +2218,7 @@
22182218
| System.Web.UI.WebControls;TextBox;false;get_Text;();;Argument[-1];ReturnValue;taint |
22192219
| System.Web;HttpCookie;false;get_Value;();;Argument[-1];ReturnValue;taint |
22202220
| System.Web;HttpCookie;false;get_Values;();;Argument[-1];ReturnValue;taint |
2221+
| System.Web;HttpServerUtility;false;HtmlEncode;(System.String);;Argument[0];ReturnValue;taint |
22212222
| System.Web;HttpServerUtility;false;UrlEncode;(System.String);;Argument[0];ReturnValue;taint |
22222223
| System.Web;HttpUtility;false;HtmlAttributeEncode;(System.String);;Argument[0];ReturnValue;taint |
22232224
| System.Web;HttpUtility;false;HtmlAttributeEncode;(System.String,System.IO.TextWriter);;Argument[0];ReturnValue;taint |

csharp/ql/test/library-tests/dataflow/library/FlowSummariesFiltered.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,6 +1903,7 @@
19031903
| System.Web.UI.WebControls;TextBox;false;get_Text;();;Argument[-1];ReturnValue;taint |
19041904
| System.Web;HttpCookie;false;get_Value;();;Argument[-1];ReturnValue;taint |
19051905
| System.Web;HttpCookie;false;get_Values;();;Argument[-1];ReturnValue;taint |
1906+
| System.Web;HttpServerUtility;false;HtmlEncode;(System.String);;Argument[0];ReturnValue;taint |
19061907
| System.Web;HttpServerUtility;false;UrlEncode;(System.String);;Argument[0];ReturnValue;taint |
19071908
| System.Web;HttpUtility;false;HtmlAttributeEncode;(System.String);;Argument[0];ReturnValue;taint |
19081909
| System.Web;HttpUtility;false;HtmlAttributeEncode;(System.String,System.IO.TextWriter);;Argument[0];ReturnValue;taint |

csharp/ql/test/resources/stubs/System.Web.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public class HttpServerUtility
4242
{
4343
public void Transfer(string path) { }
4444
public string UrlEncode(string s) => null;
45+
public string HtmlEncode(string s) => null;
4546
}
4647

4748
public class HttpApplication : IHttpHandler

0 commit comments

Comments
 (0)