adfVersion = "2_6_3"; adfFileVersion = "20"; // Initialize the RESET TYPE variable // Determine what kind of reset is needed (if any) adfResetType = ""; force = false; // Check if the ADF space exists in the SERVER and APPLICATION if ( NOT StructKeyExists(server, "ADF") ) { adfResetType = "ALL"; force = true; } else if ( NOT StructKeyExists(application, "ADF") ) { force = true; adfResetType = "SITE"; } // Setup the "Session.ADF" space if it doesn't exist for the users session if ( NOT StructKeyExists(session, "ADF") ) session.ADF = StructNew(); // Command to reset the entire ADF if( StructKeyExists(url,"resetADF") ) adfResetType = "ALL"; else { // Check the SERVER or SITE reset commands if ( StructKeyExists(url,"resetServerADF") and StructKeyExists(url,"resetSiteADF") ) adfResetType = "ALL"; else if ( StructKeyExists(url,"resetServerADF") ) adfResetType = "SERVER"; else if ( StructKeyExists(url,"resetSiteADF") ) adfResetType = "SITE"; // Check the ADF Installer commands else if ( StructKeyExists(url,"installADF") OR StructKeyExists(url,"configADF") ) adfResetType = "CONFIGURE"; else if ( StructKeyExists(url,"reinstallADF") OR StructKeyExists(url,"reconfigADF") ) adfResetType = "RECONFIGURE"; } adfCore = createObject("component", "ADF.core.Core"); resetResults = adfCore.reset(adfResetType); adfDumpMsg = ""; if ( StructKeyExists(url,"ADFDumpVar")) { // Set the cfmlEngine type cfmlEngine = server.coldfusion.productname; /* [SFS] - 2015-03-20 - Added inline style to resolve display issue with Railo 4.2.1 and a site that is using Bootstrap in its site design */ if ( !FindNoCase(cfmlEngine,'ColdFusion Server') ) adfDumpMsg = ""; // Verify if the ADF dump var exists // [MFC] - Changed "isDefined" to "LEN" // [RAK] - 2010-11-01 - Fixing security issue with cfscript code being passed into the evaluate from any logged in user // [RAK] - 2011-06-02 - Added * to end of regular expression because it was only validating the first character instead of every character in the string // [DRM] = 2014-01-08 - Moved msg to cfhtmlhead, same reasoning as with reset msg above //Anything that is not a-z or 0-9 or '.' or '[' or ']' regularExpression = '[^a-z0-9\.\[\]]]*'; if ( Len(url.ADFDumpVar) GT 0 and !ReFindNoCase(regularExpression,url.ADFDumpVar) ) { // [GAC] 2016-01-04 - Check to see if we need to render UDFs in the ADFDumpVar dump if ( !StructKeyExists(url,"showUDFs") ) url.showUDFs = 0; // Set to false by default utilsObj = CreateObject("component","ADF.lib.utils.utils_2_0"); // [GAC] 2014-05-27 - Added a security fix for the ADF dump var command adfDumpVarData = utilsObj.processADFDumpVar(dumpVarStr=url.ADFDumpVar,sanitize=true); // [GAC] 2014-05-27 - Dump the processed ADFdumpVar data if ( IsSimpleValue(adfDumpVarData) ) adfDumpMsg = adfDumpMsg & utilsObj.dodump(adfDumpVarData, url.ADFDumpVar, true, true); else adfDumpMsg = adfDumpMsg & utilsObj.dodump(adfDumpVarData, url.ADFDumpVar, false, true, url.showUDFs); } else { // 2012-01-10 - MFC - Added span tag with ID around the reset message. adfDumpMsg = "ADFDumpVar Failed : Variable '#url.ADFDumpVar#' does not exist."; } }