FCLT#54951 Computest Pentest 4.11.2

svn path=/Website/trunk/; revision=39386
This commit is contained in:
Alex Tiehuis
2018-10-15 07:33:46 +00:00
parent 5edcc98d95
commit 29cc1a7f6b

View File

@@ -27,9 +27,16 @@ var proto = (Request.ServerVariables("SERVER_PORT") == "443")?"https":"http";
var sitenoroot = proto + "://" + Request.ServerVariables("SERVER_NAME");
var site = sitenoroot + rooturl;
// put forward slash between site and url if not present at first position of url
__DoLog(site + getQParam("text"));
xc.Text = site + (RegExp(/^[\/\\]/).test(getQParam("text")) ? "" : "/") + getQParam("text");
__DoLog(xc.Text);
xc.text = getQParam("text");
if (xc.text.charAt(0) == "\\" || xc.text.charAt(0) == "\/")
{
xc.text = site + xc.text;
}
else
{
xc.text = site + "/" + xc.text;
}
// Alternative: xc.Text = site + (RegExp(/^[\/\\]/).test(getQParam("text")) ? "" : "/") + getQParam("text");
xc.Version = getQParamInt("version", -1);
xc.Autoextend = getQParamInt("autoextend", 1)==1;
xc.Level = getQParamInt("level", 1);