<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Dev Shack &#187; ColdFusion</title>
	<atom:link href="http://www.thedevshack.com/category/coldfusion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thedevshack.com</link>
	<description>Technology and Programming Blog</description>
	<lastBuildDate>Mon, 06 Jun 2011 00:13:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Integrate reCAPTCHA Into Your ColdFusion Application</title>
		<link>http://www.thedevshack.com/integrate-recaptcha-into-your-coldfusion-application/</link>
		<comments>http://www.thedevshack.com/integrate-recaptcha-into-your-coldfusion-application/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 12:13:33 +0000</pubDate>
		<dc:creator>mfleming</dc:creator>
				<category><![CDATA[ColdFusion]]></category>

		<guid isPermaLink="false">http://www.thedevshack.com/?p=330</guid>
		<description><![CDATA[  ]]></description>
			<content:encoded><![CDATA[<p>While building a recent application I had the need to prevent spam form submissions in quite a few different pages.  I started to integrate the CFIMAGE tag, then had a change of mind and decided to try something new.  I have not been a huge fan of the output of the captcha features of the CFIMAGE tag.  So I decided to give <a href="http://recaptcha.net" target="_blank">reCAPTCHA</a> a try.  This offering is much more visually appealing, has customizable colors, can speak the words, and best of all it&#8217;s a free service. <span id="more-330"></span> The output appears as such:</p>
<p style="text-align: center;"><img class="aligncenter" title="recaptcha-1" src="http://www.thedevshack.com/wp-content/uploads/2009/11/recaptcha-1.gif" alt="recaptcha-1" width="321" height="129" /></p>
<p>In order to integrate reCAPTCHA into your application, you will need to register at<a href="http://recaptcha.net/" target="_blank"> reCAPTCHA.NET </a>and obtain your public and private keys.  Once you have those you can start writing the code for integration, which is super simple.  To display the reCAPTCHA module on our form page, simply place one line of JavaScript code in the area you need it to appear.  The JavaScript call will also pass your public key to the service:</p>
<p><img class="aligncenter size-full wp-image-336" title="recaptcha-2" src="http://www.thedevshack.com/wp-content/uploads/2009/11/recaptcha-2.gif" alt="recaptcha-2" width="585" height="16" /></p>
<p>With this code you will now see the reCAPTCHA module integrated into your form page.  The module also has some customizable features that you can use to change colors, the tab index or load up one of the available themes.  This requires a little more JavaScript you write before loading in the module:</p>
<p><img class="aligncenter size-full wp-image-337" title="recaptcha-3" src="http://www.thedevshack.com/wp-content/uploads/2009/11/recaptcha-3.gif" alt="recaptcha-3" width="585" height="111" /></p>
<p>So now that the module displays, we need to be able to process the information on our form post to validate the input.  This is super simple as well, and just involves a HTTP post call and passing them your private key, the remote user&#8217;s IP address, and the two form fields created by the display module.  The response from this call will return a &#8220;true&#8221; or &#8220;false&#8221;.  You then use that to validate whether the user submitted input matched the words that were displayed.</p>
<pre class="brush:cf">&lt;cfhttp method="post" url="http://api-verify.recaptcha.net/verify" throwonerror="Yes"&gt;
    &lt;cfhttpparam name="privatekey" type="FormField" value="#YourPrivateKey#"&gt;
    &lt;cfhttpparam name="remoteip" type="FormField" value="#cgi.REMOTE_USER#"&gt;
    &lt;cfhttpparam name="challenge" type="FormField" value="#form.recaptcha_challenge_field#"&gt;
    &lt;cfhttpparam name="response" type="FormField" value="#form.recaptcha_response_field#"&gt;
&lt;/cfhttp&gt;
&lt;cfset variables.reCaptchaStatus = cfhttp.FileContent&gt;
&lt;cfif NOT FindNoCase('true', variables.reCaptchaStatus)&gt;
      &lt;!--- reCAPTCHA validation failed ---&gt;
&lt;/cfif&gt;</pre>
<p>And that&#8217;s it.  I hope you see how easy integration is and in my opinion is a much better visually appealing interface than using the CFIMAGE captcha features.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedevshack.com/integrate-recaptcha-into-your-coldfusion-application/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>DataMgr Is Worth A Look</title>
		<link>http://www.thedevshack.com/datamgr-is-worth-a-look/</link>
		<comments>http://www.thedevshack.com/datamgr-is-worth-a-look/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 00:25:27 +0000</pubDate>
		<dc:creator>mfleming</dc:creator>
				<category><![CDATA[ColdFusion]]></category>

		<guid isPermaLink="false">http://www.thedevshack.com/?p=325</guid>
		<description><![CDATA[I have been hearing lots of good things about some of the CRUD options available for use in ColdFusion applications.&#160; With a new side project coming up I decided to give DataMgr by Steve Bryant a try.&#160; I can say right from the top that I was very impressed with this tool.&#160; According to the [...]]]></description>
			<content:encoded><![CDATA[<p>I have been hearing lots of good things about some of the CRUD options available for use in ColdFusion applications.&nbsp; With a new side project coming up I decided to give <a href="http://datamgr.riaforge.org/" target="_blank">DataMgr by Steve Bryant</a> a try.&nbsp; I can say right from the top that I was very impressed with this tool.&nbsp; According to the documentation DataMgr helps you in three ways:<span id="more-325"></span></p>
<ul>
<li>CRUD: Database reads/writes including those of the type performed by cfinsert/cfupdate</li>
<li>ActiveSchema: The ability for your code to define your database structure. DataMgr can introspect the database structure or it can define it.</li>
<li>Prototyping: The ability to use simulated data for prototyping (much like QuerySim, but more powerful and less work).</li>
</ul>
<p>The only piece I have used this far are the CRUD features.&nbsp; For the project I was working on <a title="Cycling Share" href="http://www.cyclingshare.com" target="_blank">CyclingShare.com</a>, I was needing to get the application built as soon as possible.&nbsp; Everyone knows that you can easily get bogged down into writing general insert, update and delete statements when starting off a project.&nbsp; It&#8217;s also up to the developer to add in query param tags as well to prevent SQL injection attacks, etc&#8230;&nbsp; DataMgr handles those tasks for you, and lets you focus your time on other aspects of your application.&nbsp; I completed my project in a total of around 6 to 7 hours, and did not write a single insert, update or delete statement.&nbsp; DataMgr took care of those for me, as well as most of my select statements.&nbsp; I choose to write some of the more advanced SQL queries myself (although DataMgr will allow custom SQL).&nbsp; So how easy is DataMgr to use?&nbsp; Below you will find snippets that display how to use DataMgr for CRUD handling.</p>
<p><code lang="cfm[lines]"><br />
<cfscript><br />
//insert function<br />
variables.foo = Application.DataMgr.insertRecord("yourtable",form);</p>
<p>//update function<br />
variables.foo = Application.DataMgr.updateRecord("yourtable",form);</p>
<p>//delete function<br />
variables.foo = Application.DataMgr.deleteRecord("yourtable",form);</p>
<p>//select function<br />
filter = {pk_id=Session.pk_id};<br />
variables.qryUser = Application.DataMgr.getRecords("yourtable", filter);<br />
</cfscript><br />
</code></p>
<p>These are just simple examples to show you the high level functions of DataMgr.&nbsp; One tip that makes using it even more of a breeze, is to name your form fields the same as your column names from your database tables.&nbsp; You can then just pass in the entire form structure and it will take care of everything else.</p>
<p>I would highly recommend giving DataMgr a try.&nbsp; I have already found it to be quite a time saver already.&nbsp; You can see it in action here: <a title="Cycling Share" href="http://www.cyclingshare.com" target="_blank">CyclingShare.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedevshack.com/datamgr-is-worth-a-look/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Adobe Releases Public Betas of ColdFusion 9 and ColdFusion Builder</title>
		<link>http://www.thedevshack.com/adobe-releases-public-betas-of-coldfusion-9-and-coldfusion-builder/</link>
		<comments>http://www.thedevshack.com/adobe-releases-public-betas-of-coldfusion-9-and-coldfusion-builder/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 10:59:21 +0000</pubDate>
		<dc:creator>mfleming</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Adobe]]></category>

		<guid isPermaLink="false">http://www.thedevshack.com/?p=269</guid>
		<description><![CDATA[This is just a quick note that Adobe has released the public beta versions of ColdFusion 9 and the new ColdFusion Builder. Download links are below. I would also like to point out that while you try these versions out, please report any bugs you find to Adobe. This will benefit them by allowing them [...]]]></description>
			<content:encoded><![CDATA[<p>This is just a quick note that Adobe has released the public beta versions of ColdFusion 9 and the new ColdFusion Builder.  Download links are below.  I would also like to point out that while you try these versions out, please report any bugs you find to Adobe.  This will benefit them by allowing them to address the issues and it will benefit the community as a whole, as in the end it makes for a better more stable product.</p>
<p><a href="http://labs.adobe.com/technologies/coldfusion9/" target="_blank">Download ColdFusion 9 Beta</a></p>
<p><a href="http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_coldfusionbuilder" target="_blank">Download ColdFusion Builder Beta<br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedevshack.com/adobe-releases-public-betas-of-coldfusion-9-and-coldfusion-builder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe Releases Hotfix for FCKEditor Security Issue</title>
		<link>http://www.thedevshack.com/adobe-releases-hotfix-for-fckeditor-security-issue/</link>
		<comments>http://www.thedevshack.com/adobe-releases-hotfix-for-fckeditor-security-issue/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 19:45:51 +0000</pubDate>
		<dc:creator>mfleming</dc:creator>
				<category><![CDATA[ColdFusion]]></category>

		<guid isPermaLink="false">http://www.thedevshack.com/?p=266</guid>
		<description><![CDATA[Adobe has just released the hotfix for the FCKEditor security issue. You can read about and download the hotfix directly from Adobe. A summary of the potential exploit taken from the Adobe security bulletin: A vulnerability in FCKEditor, which is included as part of ColdFusion 8, could allow a remote attacker to upload files in [...]]]></description>
			<content:encoded><![CDATA[<p>Adobe has just released the hotfix for the FCKEditor security issue.  You can <a href="http://www.adobe.com/support/security/bulletins/apsb09-09.html" target="_blank">read about and download the hotfix directly from Adobe</a>.</p>
<p>A summary of the potential exploit taken from the Adobe security bulletin:</p>
<p>A vulnerability in FCKEditor, which is included as part of ColdFusion 8, could allow a remote attacker to upload files in arbitrary directories which could lead to a system compromise. This hotfix updates the version of FCKEditor included with ColdFusion 8, turns off file upload capabilities by default, restricts access to cfm files in the FCKeditoreditorfilenamanger directory, and limits file upload capabilities to users with valid sessions. This issue is remotely exploitable. There are reports that this issue is being exploited in the wild.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedevshack.com/adobe-releases-hotfix-for-fckeditor-security-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FCKEditor Security Issue Not Just a ColdFusion Problem</title>
		<link>http://www.thedevshack.com/fckeditor-security-issue-not-just-a-coldfusion-problem/</link>
		<comments>http://www.thedevshack.com/fckeditor-security-issue-not-just-a-coldfusion-problem/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 11:07:09 +0000</pubDate>
		<dc:creator>mfleming</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[coldfusion server]]></category>
		<category><![CDATA[file uploads]]></category>
		<category><![CDATA[vulnerability]]></category>

		<guid isPermaLink="false">http://www.thedevshack.com/?p=261</guid>
		<description><![CDATA[While reading through some of the ColdFusion blogs the last couple of days, I think one issue has been missed: The security vulnerability in FCKEditor exists outside of ColdFusion. In other words, if you are using the FCKEditor tool outside of ColdFusion, or your ColdFusion site uses the stand alone version (and not the embedded [...]]]></description>
			<content:encoded><![CDATA[<p>While reading through some of the ColdFusion blogs the last couple of days, I think one issue has been missed: The security vulnerability in FCKEditor exists outside of ColdFusion. In other words, if you are using the FCKEditor tool outside of ColdFusion, or your ColdFusion site uses the stand alone version (and not the embedded version with ColdFusion), this issue can leave your site open to an attack. The major error on Adobe&#8217;s part seems to be that the 8.0.1 updater introduced this issue by enabling uploads in the file upload connector. The embedded version of this editor in ColdFusion does not allow file uploads, so this feature should be disabled.<span id="more-261"></span></p>
<p>If you are using the standalone version of the FCKEditor and have file uploads enabled (using any of the connectors), you should take some steps to ensure that rouge files cannot be uploaded. The great thing about the FCKEditor tool is that it&#8217;s open source. You can easily modify the code for the connector to add in some security checks (sizes of uploads, mime type exclusions, etc&#8230;). If using this editor within a password protected admin or client area, you could also add in the authentication checks within the editor code as well. This would prevent someone from being able to upload a file without being logged into the password protected area of your site.</p>
<p>So in conclusion I just wanted to make note that this particular vulnerability does exist outside of the ColdFusion server install itself if you are using the standalone version of the FCKEditor. This latest issue can be used as a reminder to always check those third party applications you use, and to make sure you implement them the correct way.</p>
<p>To quickly patch your ColdFusion 8 installs you can follow the below recommended steps from the Adobe Security Team. It sounds as though Adobe will be releasing a hotfix for this issue very soon, but they do recommend the steps below while waiting for the hotfix to be released:</p>
<p>1. Disable connectors by setting config.Enabled to false in the editor/filemanager/connectors/cfm/config.cfm file.<br />
2. Remove unused cfm files under editor/filemanager/connectors/cfm directory of the FCKeditor.<br />
3. Inspect FCKeditor directories for content that has already been uploaded. The uploaded files go under the directory specified in the config.UserFilesPath set in config.cfm.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedevshack.com/fckeditor-security-issue-not-just-a-coldfusion-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ColdFusion &amp; .NET: Comparing List Functions</title>
		<link>http://www.thedevshack.com/coldfusion-net-comparing-list-functions/</link>
		<comments>http://www.thedevshack.com/coldfusion-net-comparing-list-functions/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 11:31:18 +0000</pubDate>
		<dc:creator>mfleming</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ColdFusion]]></category>

		<guid isPermaLink="false">http://www.thedevshack.com/?p=232</guid>
		<description><![CDATA[It&#8217;s been awhile since I have added a new post to the series that compares code in ColdFusion &#038; .NET. Today&#8217;s post covers something I use quite a bit throughout some of my applications: storing values in a list type format. If you have programmed in ColdFusion for years, you take the built in list [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been awhile since I have added a new post to the series that compares code in ColdFusion &#038; .NET.  Today&#8217;s post covers something I use quite a bit throughout some of my applications: storing values in a list type format.  If you have programmed in ColdFusion for years, you take the built in list functions for granted.  Today&#8217;s example covers storing a simple list of ID&#8217;s in a variable.  You could use this for storing user group associations or something like that.  The example will show you how to add an item to the list and then search the list to see if a certain value is stored within it.</p>
<p>First up the ColdFusion code:</p>
<p><code lang="cfm[lines]"><br />
<cfset variables.newID = CreateUUID()><br />
<cfset variables.idList = ""><br />
<cfset variables.idList = ListAppend(variables.idList, variables.newID)></p>
<p><cfif ListFindNoCase(variables.idList, variables.newID)><br />
	Value Found<br />
<cfelse><br />
	Value Not Found<br />
</cfif><br />
</code></p>
<p>This code is fairly simple.  We create a UUID, use the ListAppend function to add the value to our list, then use ListFindNoCase to see if our value is in the list.</p>
<p>Now for the .NET code:</p>
<p><code lang="csharp[lines]">using System;<br />
using System.Collections.Generic;<br />
using System.Web;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Collections;</p>
<p>public partial class list_test : System.Web.UI.Page<br />
{<br />
    protected void Page_Load(object sender, EventArgs e)<br />
    {<br />
        Guid newID = System.Guid.NewGuid();<br />
        ArrayList idList = new ArrayList();<br />
        idList.Add(newID);</p>
<p>        if (idList.Contains(newID) == true)<br />
            foundLabel.Text = "Item Found";<br />
        else<br />
            foundLabel.Text = "Item Not Found";<br />
    }<br />
}</code></p>
<p>This code is fairly simple as well.  The big difference between the two languages is that .NET treats the list as an array, so we first set uo our ArrayList object, add our Guid value to the ArrayList, then search for our value using the Contains function.  We then update the value of a label on our front end page depending on our results.</p>
<p>So as you can see using lists is easy no matter which language you use.  Both languages also allow you to store your lists in the session scope as well.  The one pointer for doing this in .NET is you must cast your value back out to an ArrayList object when reading it from the session:</p>
<p><code lang="csharp[lines]"><br />
ArrayList newsList = (ArrayList)Session["newsList"];<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedevshack.com/coldfusion-net-comparing-list-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ColdFusion Gets Some Gartner Love</title>
		<link>http://www.thedevshack.com/coldfusion-gets-some-gartner-love/</link>
		<comments>http://www.thedevshack.com/coldfusion-gets-some-gartner-love/#comments</comments>
		<pubDate>Fri, 15 May 2009 11:12:33 +0000</pubDate>
		<dc:creator>mfleming</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Abobe]]></category>
		<category><![CDATA[Gartner]]></category>

		<guid isPermaLink="false">http://www.thedevshack.com/?p=209</guid>
		<description><![CDATA[Finally, some good press for ColdFusion! Mark Driver, a Gartner analyst, recently published an analyst note on ColdFusion. It has some good things to say about ColdFusion and that Abobe has strong support for the product. Nice to see others praising a product that we in the ColdFusion community have praised for years. The report [...]]]></description>
			<content:encoded><![CDATA[<p>Finally, some good press for ColdFusion!  Mark Driver, a Gartner analyst, recently published an analyst note on ColdFusion.  It has some good things to say about ColdFusion and that Abobe has strong support for the product.  Nice to see others praising a product that we in the ColdFusion community have praised for years.</p>
<p>The report is not free, but <a href="http://www.webbschofield.com/index.cfm/2009/5/14/Analysts-at-Gartner-Praise-CF" target="_blank">Kristen Schofield has some excerpts posted on her blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedevshack.com/coldfusion-gets-some-gartner-love/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Will Twitter Kill RSS Feeds?</title>
		<link>http://www.thedevshack.com/will-twitter-kill-rss-feeds/</link>
		<comments>http://www.thedevshack.com/will-twitter-kill-rss-feeds/#comments</comments>
		<pubDate>Thu, 07 May 2009 11:32:55 +0000</pubDate>
		<dc:creator>mfleming</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Cycling]]></category>
		<category><![CDATA[Motorsports]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[RSS]]></category>

		<guid isPermaLink="false">http://www.thedevshack.com/?p=197</guid>
		<description><![CDATA[I have read numerous articles this week on the subject of Twitter replacing RSS feeds for some people, so I thought I would share my two cents on the subject. I&#8217;ll start by saying I was a late adopter to Twitter, having been signed up for only a few months now. Over that time period [...]]]></description>
			<content:encoded><![CDATA[<p>I have read numerous articles this week on the subject of Twitter replacing RSS feeds for some people, so I thought I would share my two cents on the subject.  I&#8217;ll start by saying I was a late adopter to Twitter, having been signed up for only a few months now. Over that time period Twitter is slowly overtaking my reading of news from my RSS feeds.  I have always been a huge fan of Google Reader, and it&#8217;s been my primary source of news, sports information, tech blogs, etc&#8230;  Every day now I find myself removing feeds from Reader once I see the site I was subscribed to also offers a Twitter feed.  In the near future I can say I will probably not use Google Reader anymore.  Twitter will become my main source of content.  So count me in the large group of folks who see Twitter as an RSS killer.</p>
<p>In the next couple of weeks I will be sharing a ColdFusion based project I have created that aggregates RSS based content on certain news subjects (Pro Cycling and Motorsports).  This is just one other step I have taken to provide a means of having more content viewable via Twitter.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedevshack.com/will-twitter-kill-rss-feeds/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>ColdFusion: Grab Yourself a TinyURL</title>
		<link>http://www.thedevshack.com/coldfusion-grab-yourself-a-tinyurl/</link>
		<comments>http://www.thedevshack.com/coldfusion-grab-yourself-a-tinyurl/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 11:03:18 +0000</pubDate>
		<dc:creator>mfleming</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[CFHTTP]]></category>
		<category><![CDATA[cfm]]></category>
		<category><![CDATA[TinyURL]]></category>

		<guid isPermaLink="false">http://www.thedevshack.com/?p=173</guid>
		<description><![CDATA[I have been working on a new application the last few days and one of the requirements was to generate a short URL. There are many different URL shortening services out there today, but I decided to go with one of the original services, TinyURL. Although this service does not provide any sort of API, [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working on a new application the last few days and one of the requirements was to generate a short URL.  There are many different URL shortening services out there today, but I decided to go with one of the original services, TinyURL.  Although this service does not provide any sort of API, they do offer a quick and dirty HTTP post method of grabbing a short URL.  Using CFHTTP in ColdFusion makes this easy, and only requires a single line of code:</p>
<p><code lang="cfm[lines]"><cfhttp method="get" result="tinyURL" url="http://tinyurl.com/api-create.php?url=http://www.yourlongurl.com"></code></p>
<p>All this does is call the TinyURL post URL and pass in the URL you would like shortened.  The post simply returns the text that contains the shortened URL.  Now that was to easy!  It is a good idea to check the status code of the HTTP call.  If a status of 200 is returned, then all is well.  If not you can handle the error any way you would like.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedevshack.com/coldfusion-grab-yourself-a-tinyurl/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Preventing XSS (Cross-Site Scripting) Attacks in ColdFusion</title>
		<link>http://www.thedevshack.com/preventing-xss-cross-site-scripting-attacks-in-coldfusion/</link>
		<comments>http://www.thedevshack.com/preventing-xss-cross-site-scripting-attacks-in-coldfusion/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 22:19:47 +0000</pubDate>
		<dc:creator>mfleming</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[attack]]></category>
		<category><![CDATA[HTMLEditFormat]]></category>
		<category><![CDATA[Protection]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[scriptProtect]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[validate]]></category>
		<category><![CDATA[XSS]]></category>

		<guid isPermaLink="false">http://www.thedevshack.com/?p=161</guid>
		<description><![CDATA[With the recent issues Twitter has faced in recent days, I thought it would be important to show how you can prevent XSS attacks in ColdFusion. For a detailed explanation of what XSS is you can read a good summary here. So how can you protect against this type of attack? ColdFusion has some built [...]]]></description>
			<content:encoded><![CDATA[<p>With the recent issues Twitter has faced in recent days, I thought it would be important to show how you can prevent XSS attacks in ColdFusion.  For a detailed explanation of what XSS is you can <a href="http://www.cgisecurity.com/xss-faq.html" target="_blank">read a good summary here</a>.  So how can you protect against this type of attack?</p>
<p>ColdFusion has some built in functionality to make this really easy.  These are the steps I would recommend you take to help prevent XSS attacks:</p>
<ol>
<li>You can enable Global Script Protection in your application.  You can accomplish this by using the scriptProtect attribute in your application.cfc.  You can set this to automatically add some protection to your form, URL, CGI and cookie variables.  You can also pass in a column delimited list of the scopes you wish to add the default protection to.</li>
<li>You can also globally enable script protection at the server level via the ColdFusion Administrator.  Under settings is a checkbox to Enable Global Script Protection.  This will default every application on the server to use script protection by default.</li>
<li>Use HTMLEditFormat around ANY variables that contain user submitted input.  This function will convert any submitted HTML tags into their HTML character entity.  This can help to stop malicious Javascript code for example from being served to the browser.</li>
<li>The sure fire way to prevent this type of attack is to simply search and replace any maliciuous data.  In other words, replace script tags, etc&#8230; with nothing.</li>
<li>Validate user submitted input on the server side.  If you are expecting a numeric value in a field, make sure it&#8217;s numeric.  Also validate maximum lengths.  If you have a state field that is only 2 characters in length, validate it to make sure it&#8217;s no bigger.</li>
</ol>
<p>As you can see ColdFusion provides many features and functions to aid you in preventing an XSS attack on your site.  It&#8217;s up to you to put these practices in place!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedevshack.com/preventing-xss-cross-site-scripting-attacks-in-coldfusion/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

