forked from rohitcoderCdefense/vulnCodes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCWE-200.cs
28 lines (27 loc) · 861 Bytes
/
CWE-200.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls.WebParts;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string username = Request["username"];
string password = Request["password"];
string callback = Request["callback"];
string token = FormsAuthentication.HashPasswordForStoringInConfigFile(username + password, "SHA1");
if (callback == "http://localhost:8080/Default.aspx")
{
Response.Redirect(callback + "?token=" + token);
}
else
{
Response.Redirect("http://localhost:8080/Default.aspx");
}
}
}