/* goodG2B() - use goodsource and badsink */ private void GoodG2B(HttpRequest req, HttpResponse resp) { string data; /* FIX: Use a hardcoded user ID */ data = "10"; CWE566_Authorization_Bypass_Through_SQL_Primary__Web_51b.GoodG2BSink(data, req, resp); }
public override void Bad(HttpRequest req, HttpResponse resp) { string data; /* FLAW: Get the user ID from a URL parameter */ data = req.Params.Get("id"); CWE566_Authorization_Bypass_Through_SQL_Primary__Web_51b.BadSink(data, req, resp); }