Displaying Tag Restrictions on ColdFusion Server

<cfset CFFILEtst =0>
<cfset CFDIRECTORYtst=0 >
<cfset CFCOLLECTIONtst=0>
<cfset CFCONTENTtst=0>
<cfset CFEXECUTEtst=0>
<cfset CFLOGtst=0>
<cfset CFOBJECTtst=0>
<cfset CFOBJECTCACHEtst=0>
<cfset CFREGISTRYtst=0>
<cfset SetProfileStringtst=0>
<cfset CreateObjectCOMtst=0>
<cfset CreateObjectCORBAtst=0>
<cfset CreateObjectJAVAtst=0>

These are the tags we should look for I belive:

   CF tags:
      CFFILE
      CFDIRECTORY
      CFCOLLECTION
      CFCONTENT
      CFEXECUTE
      CFLOG
      CFOBJECT
      CFOBJECTCACHE
      CFREGISTRY

   CF functions:
      SetProfileString
      CreateObject(COM)
      CreateObject(CORBA)
      CreateObject(JAVA)

<style type="text/css">
    <!--
    .No {
        color: #FF0000;
        font-weight: bold;
    }    
    .Yes {
        color: #00CC00;
        font-weight: bold;
    }
    -->
</style>

<cftry>
   <cffile action="write" addnewline=
"yes" charset="utf-8" file="HelloWorld.txt" output="Hello World" fixnewline="no">
   <cfcatch type=
"Any">
      <cfset CFFILEtst =1>
   </cfcatch>
</cftry>

<cftry>
   <CFDIRECTORY directory=
"C:\Sites\dev\dfgdfdfhvcvb" action="create">
   <CFDIRECTORY directory=
"C:\Sites\dev\dfgdfdfhvcvb" action="delete" recurse="no">
   <cfcatch type=
"Any">
      <cfset CFDIRECTORYtst=1>
   </cfcatch>
</cftry>

<cftry>
   <CFEXECUTE name=
"notepad.exe"></CFEXECUTE>
   <cfcatch type=
"Any">
      <cfset CFEXECUTEtst=1>
   </cfcatch>
</cftry>


<table width="150" border="1" cellspacing="2" cellpadding="0">
   <tr>
      <th>
Tag</th>
      <th>
Passed</th>
   </tr>
   <tr>
      <td nowrap>
CFFILE = </td>
      <cfif CFFILEtst IS 1>
         <td class="No">No</td>
      <cfelse>
         <td class="Yes">Yes</td>
      </cfif>
   </tr>
<tr>
   <td nowrap>
CFDIRECTORY = </td>
   <cfif CFDIRECTORYtst IS 1>
      <td class="No">No</td>
   <cfelse>
      <td class="Yes">Yes</td>
   </cfif>
</tr>
<tr>
   <td nowrap>
CFEXECUTE = </td>
   <cfif CFEXECUTEtst IS 1>
      <td class="No">No</td>
   <cfelse>
      <td class="Yes">Yes</td>
   </cfif>
</tr>
</table>

All ColdFusion Tutorials By Author: James Harvey
  • Displaying Tag Restrictions on ColdFusion Server

    This Tutorial will show you how to display tag restricitons with Sandbox Security enabled.


    Author: James Harvey
    Views: 13,286
    Posted Date: Thursday, August 27, 2009
  • Dynamically Generating HTML Table Columns & Rows
    Dynamically Generate and HTML Table with a Dynamic Number of Columns and rows.
    Author: James Harvey
    Views: 13,995
    Posted Date: Thursday, April 3, 2008
  • Using Coldfusion to Import CSV Files

    Many times we need a quick and easy way of importing data into our website databases. The CSV file format is one of the defacto standards for moving data between databases easily. Virtually all databases allow exported to CSV format. And virtually all database support importing a CSV formatted file. So why use Coldfusion to do this mundane task? Simply put it is database independant - in this example I created a simple script that reads a CSV file and inserts the records into a matched mySQL table. When I first started looking at this I was surprised that I could find very little of how to achieve this. So now that I have it worked out I thought I could share this little piece...


    Author: James Harvey
    Views: 3,059
    Posted Date: Thursday, August 27, 2009
  • Making Calls with Coldfusion (For Use With Vonage)

    This is a Spry & Coldfusion tutorial for making phone calls via the internet. This Tutorial has a catch however, it's for use with Vonage's 'Click-to-Call' service.

     


    Author: James Harvey
    Views: 2,790
    Posted Date: Thursday, August 27, 2009
  • SEO URLS via ColdFusion

    In this tutorial, I'm showing you a working method for URL Rewriting using ColdFusion, and a ColdFusion CFC.
    You'll be able to have your old urls like: http://yoursite.com/index.cfm?var1=1&var2=2
    to be viewed and displayed as: http://yoursite.com/index.cfm/var1/1/var2/2/


    Author: James Harvey
    Views: 3,214
    Posted Date: Thursday, September 24, 2009
  • Collecting User Statistics with JavaScript, and ColdFusion

    This tutorial shows you how to gather and store user statistics, including Browser, Browser Version, Screen Width, Color Depth, Screen Height, Bit Rate and User Environment. Includes Browser Detection for IPhone, Blackberry, and Android-based mobile devices...

     


    Author: James Harvey
    Views: 12,527
    Posted Date: Thursday, September 24, 2009
  • Setting Form EncType Dynamically in Internet Explorer

    In FireFox, you can dynamically set the EncType of a form element to be "multipart/form-data" for file uploads; however, this does not work in Internet Explorer (IE). Apparently in IE, you have to set the "encoding" of the form rather than the "enctype". The good news is, you can set both values without concern and this will take care of the problem:


    Author: James Harvey
    Views: 2,353
    Posted Date: Saturday, October 17, 2009
  • Generating RSS Feeds with cffeed (ColdFusion 8+)

    This Tutorial Will show you how to generate RSS Feeds from a Database Query and have those feeds made into a Compliant RSS 2.0 Feed Requires ColdFusion 8, will not work on earlier version of Coldfusion.


    Author: James Harvey
    Views: 2,818
    Posted Date: Saturday, October 17, 2009
  • Optimizing a MySQL Database in Coldfusion

    In this tutorial I'll show you how to optimze your database tables in MySQL (The script is very similiar for SQL Server) by using CFQUERY in a coldfusion page.

     


    Author: James Harvey
    Views: 4,089
    Posted Date: Tuesday, October 27, 2009
  • Detecting Mobile Browsers

    It's becoming more and more common that Users are accessing your website from a mobile web browser (like that from an IPhone, Blackberry, Android or other mobile device). It's also becoming more prevelant that you need to start supporting and developing for the mobile platforms. But how would you begin?

    This tutorial will help you out.


    Author: James Harvey
    Views: 4,766
    Posted Date: Tuesday, December 1, 2009
  • JQuery & Coldfusion Username Check Utility

    In this tutorial, I'm going to show you how easy it is to create a username check utility directly inside your web-based form, using JQuery & ColdFusion.


    Author: James Harvey
    Views: 742
    Posted Date: Tuesday, August 17, 2010
  • Using JQUERY to Detect an End of Session event

    With AJAX applications giving us a lot more power than an "old school" web 1.0 page, it isn't unusual for someone to just sit on one page and fire off various operations that use HTTP to fetch and present data. This works fine until you leave the site alone for too long and your session times out. (I'm assuming most folks use a time based session, much like how ColdFusion works.) The question is - what happens in your current AJAX based application when a user's session times out?

    There is a solution...


    Author: James Harvey
    Views: 733
    Posted Date: Tuesday, August 17, 2010
Download the EasyCFM.COM Browser Toolbar!