/* goodG2B() - use goodsource and badsink */ private static void GoodG2B(HttpRequest req, HttpResponse resp) { string data; /* FIX: Use a hardcoded string */ data = "foo"; CWE113_HTTP_Response_Splitting__Web_Params_Get_Web_addHeader_71b.GoodG2BSink((Object)data, req, resp); }
/* goodB2G() - use badsource and goodsink */ private static void GoodB2G(HttpRequest req, HttpResponse resp) { string data; /* POTENTIAL FLAW: Read data from a querystring using Params.Get */ data = req.Params.Get("name"); CWE113_HTTP_Response_Splitting__Web_Params_Get_Web_addHeader_71b.GoodB2GSink((Object)data, req, resp); }
public override void Bad(HttpRequest req, HttpResponse resp) { string data; /* POTENTIAL FLAW: Read data from a querystring using Params.Get */ data = req.Params.Get("name"); CWE113_HTTP_Response_Splitting__Web_Params_Get_Web_addHeader_71b.BadSink((Object)data, req, resp); }