// 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"; } } adfCore = createObject("component", "ADF.core.Core"); resetResults = adfCore.reset(adfResetType); #resetResults.message# if ( StructKeyExists(url,"ADFDumpVar")) { // 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 //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)){ CreateObject("component","ADF.lib.utils.Utils_1_0").dodump(evaluate(url.ADFDumpVar), #url.ADFDumpVar#, false); }else{ // 2012-01-10 - MFC - Added span tag with ID around the reset message. WriteOutput("ADFDumpVar Failed : Variable '#url.ADFDumpVar#' does not exist."); } }