- qpscanner/circuits/scanner/act_prepare.cfm
- v0.7.3.1
- 1004 B
- 34
1
2<!---
3 INFO:
4 Expands automatic values.
5--->
6
7
8<cfif StructKeyExists(ScanData,'RequestTimeout') AND NOT isNumeric(ScanData.RequestTimeout)>
9 <cfset ScanData.RequestTimeout = -1/>
10</cfif>
11
12<cfif ScanData.StartingDir EQ 'auto'>
13 <cfset ScanData.StartingDir = Settings.findHomeDirectory()/>
14</cfif>
15
16
17<cffunction name="isAbsoluteDirectory" returntype="Boolean" output="false">
18 <cfargument name="DirName" type="String" />
19
20 <cfif findnocase('windows',Server.OS.Name)>
21 <cfreturn refindnocase('\A[a-z]:',Arguments.DirName) />
22 <cfelse>
23 <cfreturn (left(Arguments.DirName,1) EQ '/') />
24 </cfif>
25</cffunction>
26
27<cfif NOT (ListFind('ColdFusion Server,BlueDragon',Server.ColdFusion.ProductName)
28 AND isAbsoluteDirectory(ScanData.StartingDir)
29 )>
30 <cfset ScanData.StartingDir = expandPath( ScanData.StartingDir & '/' )/>
31</cfif>
32
33
34<cfset ScanData.StartingDir = jre.replace( ScanData.StartingDir , '\\' , '/' , 'all' )/>
35<cfset ScanData.StartingDir = jre.replace( ScanData.StartingDir , '/+$' , '' , 'all' )/>