Skip to content

Commit b002909

Browse files
author
dustymc
committed
1 parent 60aae3f commit b002909

File tree

5 files changed

+14
-36
lines changed

5 files changed

+14
-36
lines changed

Application.cfc

+5-16
Original file line numberDiff line numberDiff line change
@@ -211,19 +211,11 @@
211211
<cfdump var=#cgi# label="cgi">
212212
</cfmail>
213213
</cfif>
214-
215-
216214
<cfmail subject="good app start" to="[email protected]" from="badAppStart@#application.fromEmail#" type="html">
217-
just started
218-
serverName=<cfdump var="#serverName#">
219-
<cfdump var=#cgi# label="cgi">
220-
</cfmail>
221-
222-
223-
224-
225-
226-
215+
just started
216+
serverName=<cfdump var="#serverName#">
217+
<cfdump var=#cgi# label="cgi">
218+
</cfmail>
227219
<cftry>
228220
<cfquery name="d" datasource="uam_god">
229221
select ip from uam.blacklist where sysdate-LISTDATE<180
@@ -314,10 +306,7 @@
314306
</cffunction>
315307
<!-------------------------------------------------------------->
316308
<cffunction name="onRequestStart" returnType="boolean" output="true">
317-
318-
<cfset request.rdurl=replacenocase(cgi.query_string,"path=","","all")>
319-
320-
309+
<cfset request.rdurl=replacenocase(cgi.query_string,"path=","","all")>
321310
<cfset temp=getIpAddress()>
322311
<cfif cgi.script_name is not "/errors/missing.cfm">
323312
<cfset request.rdurl=cgi.script_name & "?" & request.rdurl>

CustomTags/logError.cfm

-9
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,6 @@
156156
<cfset logdata=logdata & "<#key#>#replace(replace(exception[key],'=','[EQUALS]','all'),'&','[AND]','all')#</#key#>">
157157
</cfloop>
158158
<cfset logdata=logdata & "</logEntry>">
159-
160-
161-
162-
<cfset Application.webDirectory = "/usr/local/httpd/htdocs/wwwarctos">
163-
164-
165-
166-
167-
168159
<cffile action="append" file="#Application.webDirectory#/log/#theLogFile#" output="#logdata#">
169160
<cfmail subject="#exception.subject#" to="#Application.LogEmail#" from="logs@#application.fromEmail#" type="html">
170161
<a href="http://network-tools.com/default.asp?prog=network&host=#exception.ipaddress#">[ lookup #exception.ipaddress# ]</a>

Encumbrances.cfm

+5-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,11 @@
245245
[ Modify This Encumbrance ]
246246
</span>
247247
<a href="/SpecimenResults.cfm?encumbrance_id=#encumbrance_id#">[ See Specimens ]</a>
248-
<a href="/Admin/deleteSpecByEncumbrance.cfm?encumbrance_id=#encumbrance_id#">[ Delete Encumbered Specimens ]</a>
248+
<cfif listfindnocase(session.roles, "MANAGE_COLLECTION")>
249+
<a href="/Admin/deleteSpecByEncumbrance.cfm?encumbrance_id=#encumbrance_id#">[ Delete Encumbered Specimens ]</a>
250+
<cfelse>
251+
Manage_collection access is required to delete.
252+
</cfif>
249253
<span class="likeLink" onclick="confirmRemoveSpecs('#encumbrance_id#')">
250254
[ Remove all specimens from this encumbrance ]
251255
</span>

errors/404.cfm

-6
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,11 @@
3333
</cfif>
3434
<cfabort>
3535
</cfif>
36-
3736
<cfset f = CreateObject("component","component.utilities")>
38-
3937
<!--- pass in the URL to ensure the error side of the checker fires ---->
4038
<cfset x=f.checkRequest(request.rdurl)>
41-
42-
4339
<cfset fourohthree="dll,png,crossdomain,xml">
4440
<cfset browsergarbage="apple-touch-icon,browserconfig">
45-
4641
<cfloop list="#request.rdurl#" delimiters="./&+()" index="i">
4742
<cfloop list="#browsergarbage#" index="bg">
4843
<cfif i contains bg>
@@ -52,7 +47,6 @@
5247
<cfif listfindnocase(fourohthree,i)>
5348
<cfthrow detail="You've requested a form which isn't available. This may be an indication of unwanted or malicious software on your computer." message="403: Forbidden" errorcode="403">
5449
</cfif>
55-
5650
</cfloop>
5751
<!--- we don't have a redirect, and it's not on our hitlist, so 404 --->
5852
<cfheader statuscode="404" statustext="Not found">

errors/autoblacklist.cfm

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@
5454
<!--- sometimes already-banned IPs end up here due to click-flooding etc. ---->
5555
<cfif listcontains(application.blacklist,request.ipaddress)>
5656
<!--- they're already actively blacklisted - do nothing here---->
57-
<cf_logError subject="#pa#existing active IP autoblacklisted">
57+
<cf_logError subject="#pa#existing active IP autoblacklisted" message="#bl_reason#">
5858
<cfinclude template="/errors/gtfo.cfm">
5959
<cfabort>
6060
</cfif>
6161
<cfif listcontains(application.subnet_blacklist,request.requestingSubnet,",")>
6262
<!--- they're already actively blacklisted - do nothing here---->
63-
<cf_logError subject="#pa#existing active subnet autoblacklisted">
63+
<cf_logError subject="#pa#existing active subnet autoblacklisted" message="#bl_reason#">
6464
<cfinclude template="/errors/gtfo.cfm">
6565
<cfabort>
6666
</cfif>
@@ -73,15 +73,15 @@
7373
update uam.blacklist set LISTDATE=sysdate where ip='#trim(request.ipaddress)#'
7474
</cfquery>
7575
<cfset application.blacklist=listappend(application.blacklist,trim(request.ipaddress))>
76-
<cf_logError subject="#pa#updated autoblacklist">
76+
<cf_logError subject="#pa#updated autoblacklist" message="#bl_reason#">
7777
<cfinclude template="/errors/gtfo.cfm">
7878
<cfabort>
7979
<cfelse>
8080
<cfquery name="d" datasource="uam_god">
8181
insert into uam.blacklist (ip) values ('#trim(request.ipaddress)#')
8282
</cfquery>
8383
<cfset application.blacklist=listappend(application.blacklist,trim(request.ipaddress))>
84-
<cf_logError subject="#pa#new autoblacklist" message="#bl_reason#">
84+
<cf_logError subject="#pa#new autoblacklist" message="#bl_reason#">
8585
<cfinclude template="/errors/gtfo.cfm">
8686
<cfabort>
8787
</cfif>

0 commit comments

Comments
 (0)