-
Notifications
You must be signed in to change notification settings - Fork 0
/
security.cfm
50 lines (48 loc) · 1.93 KB
/
security.cfm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<cfoutput>
<cfsavecontent variable="myXml">
<?xml version="1.0"?>
<cjFileBrowser version="4.0.2">
<!-- **********************************************
Master list of authorized actions.
*Actions not listed are not allowed.
********************************************** -->
<actionsAllowed>
<action>navigateDirectory</action>
<action>createDirectory</action>
<action>deleteDirectory</action>
<action>fileDelete</action>
<action>fileUpload</action>
<action>dropUpload</action>
<action>filePreviews</action>
<action>fileSelect</action>
</actionsAllowed>
<!-- **********************************************
Master list of authorized directories.
Use "/" to allow all directories
*Relative from ROOT (Don't use "../" not sure that will work)
********************************************** -->
<directoriesAllowed>
<!--- trying to automatically determine root. This may not work for your installation --->
<cfif FileExists(ExpandPath('../../../../Application.cfc'))>
<cfset base_url = "/#GetDirectoryFromPath(ExpandPath('../../../../Application.cfc'))#" />
<cfset base_url = ReplaceNoCase(base_url, ExpandPath('/'), '', 'ALL') />
<cfset base_url = Replace(base_url, '\', '/', 'ALL') />
<cfelse>
<cfset base_url = "/" />
</cfif>
<directory type="relative">#base_url#assets/content/</directory>
</directoriesAllowed>
<!-- **********************************************
Master list of authorized file extensions.
A comma seperated list of file extension.
Use "*" to allow all file types.
i.e. jpg,gif,tiff,tif,png
********************************************** -->
<fileExtsAllowed>
<fileExt>*</fileExt>
</fileExtsAllowed>
</cjFileBrowser>
</cfsavecontent>
</cfoutput>
<cfset myXml = Trim(REReplace(myXml, "[\r\t\n]+", "", "ALL")) />
<cfcontent type="application/xml" reset="true" variable="#ToBinary(ToBase64(myXml))#" />