Ejemplo n.º 1
0
        /* goodG2B() - use goodsource and badsink */
        private static void GoodG2B(HttpRequest req, HttpResponse resp)
        {
            string data;

            /* FIX: Set data to an integer represented as a string */
            data = "10";
            CWE94_Improper_Control_of_Generation_of_Code__Params_Get_Web_71b.GoodG2BSink((Object)data, req, resp);
        }
Ejemplo n.º 2
0
        /* 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");
            CWE94_Improper_Control_of_Generation_of_Code__Params_Get_Web_71b.GoodB2GSink((Object)data, req, resp);
        }
Ejemplo n.º 3
0
        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");
            CWE94_Improper_Control_of_Generation_of_Code__Params_Get_Web_71b.BadSink((Object)data, req, resp);
        }