I had some legacy code under ASP MVC 3 (what is absolutely broke all theoretical ASP MVC ideas). And as I understated this code were possible to hack, via send fake postback to controller ? I just wonder how it possible to hack ValidateAntiForgeryToken and Session fake session. What is software people can use for it ?
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult ProcessSignUpRequest()
{
string message = "";
string username = Request.Form["txtusername"];
string email = Request.Form["txtemail"];
string name = Request.Form["txtusername"];
string password = Request.Form["txtoldpassword"];
string txtCaptcha = Request.Form["txtcaptcha"];
string startTime = Request.Form["startTime"];
string userphone = Request.Form["phone"];
try
{
if (txtCaptcha != (string)Session[Constants.CaptchaCodeSessionKey])
{
message = "captcha is wrong";
return GetStandardJsonActionResult(false, message);
}
// some code about adding user to database
return GetStandardJsonActionResult(true, message);
}
catch (Exception ex)
{
return GetStandardJsonActionResult(false, "Not possible to create user. " + username);
}
}