Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2 from thenitai/thenitai-security-patch-1
Browse files Browse the repository at this point in the history
Update downloadlogfile.cfm
  • Loading branch information
thenitai authored Mar 18, 2019
2 parents 2dd68c9 + 3719775 commit 1e878a1
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions bluedragon/administrator/debugging/downloadlogfile.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@
along with the Open BlueDragon Administrator. If not, see
<http://www.gnu.org/licenses/>.
--->
<cfset fullPath = Application.debugging.getLogFilePath(url.logFile) />
<cfset fullPath = "#fullPath#/#url.logFile#" />
<cfheader name="Content-disposition" value="attachment;filename=#url.logFile#" />
<cfcontent type="text/plain" file="#fullPath#" />
<cfif listLast(url.logFile, "/") CONTAINS ".log">
<cfset fullPath = Application.debugging.getLogFilePath(url.logFile) />
<cfset fullPath = "#fullPath#/#url.logFile#" />
<cfheader name="Content-disposition" value="attachment;filename=#url.logFile#" />
<cfcontent type="text/plain" file="#fullPath#" />
<cfelse>
<cfsavecontent variable="request.content">
<h2>Nothing here for you!</h2>
</cfsavecontent>
</cfif>

0 comments on commit 1e878a1

Please sign in to comment.