Fac_verify iets robuuster bij afwijkende rooturl

svn path=/Website/branches/v2017.1/; revision=34396
This commit is contained in:
Jos Groot Lipman
2017-06-22 10:43:13 +00:00
parent 0491024f04
commit bc10f2fee7

View File

@@ -52,6 +52,17 @@ if (Request.Form("saveas").count > 0)
Response.contenttype = "application/octet-stream";
Response.AddHeader("content-disposition","attachment; filename=FACILITOR_verify_" + custID + "_" + toDateString(new Date()) + ".html");
}
// rooturl bepalen
var pad = String(Request.ServerVariables("PATH_INFO"));
var lowerpad = pad.toLowerCase();
var i1 = lowerpad.indexOf("/cust/");
if (i1 < 0)
i1 = lowerpad.indexOf("/appl/");
if (i1 < 0)
i1 = lowerpad.indexOf("/default.asp"); // API's
/* global */ rooturl = pad.substr(0, i1);
%>
<!DOCTYPE html>
<head>
@@ -723,8 +734,8 @@ checker("Managed code should not be enabled.",
__GROUP = "FACILITOR software";
//------------------------------------------------------------------------------
testfolder("../../cust", true); // mustbethere
testfolder("../../temp", true); // mustbethere
testfolder(rooturl + "/cust", true); // mustbethere
testfolder(rooturl + "/temp", true); // mustbethere
// TODO: Zelf onder cust zoeken naar een (enkele) folder met een Oracle.udl?
checker("Determine customerID",
@@ -735,10 +746,10 @@ checker("Determine customerID",
}
)
testfolder("../../cust/"+custID, true);
custFolder = Server.MapPath("../../cust/"+custID);
testfolder(rooturl + "/cust/"+custID, true);
custFolder = Server.MapPath(rooturl + "/cust/"+custID);
testfile = Server.MapPath("../../default.asp");
testfile = Server.MapPath(rooturl + "/default.asp");
checker("../default.asp file available",
function ()
{
@@ -748,8 +759,8 @@ checker("../default.asp file available",
)
__GROUP = "Customer files";
testfolder("../../cust/"+custID+"/flexfiles", false); // neednotbethere
testfolder("../../cust/"+custID+"/dwf", false); // neednotbethere
testfolder(rooturl + "/cust/"+custID+"/flexfiles", false); // neednotbethere
testfolder(rooturl + "/cust/"+custID+"/dwf", false); // neednotbethere
__GROUP = "Settings";