Пример #1
0
 /* goodB2G() - use badsource and goodsink */
 private static void GoodB2G(HttpRequest req, HttpResponse resp)
 {
     data = ""; /* initialize data in case id is not in query string */
     /* POTENTIAL FLAW: Parse id param out of the URL querystring (without using getParameter()) */
     {
         if (req.QueryString["id"] != null)
         {
             data = req.QueryString["id"];
         }
     }
     CWE606_Unchecked_Loop_Condition__QueryString_Web_68b.GoodB2GSink(req, resp);
 }
Пример #2
0
 /* goodG2B() - use goodsource and badsink */
 private static void GoodG2B(HttpRequest req, HttpResponse resp)
 {
     /* FIX: Use a hardcoded int as a string */
     data = "5";
     CWE606_Unchecked_Loop_Condition__QueryString_Web_68b.GoodG2BSink(req, resp);
 }