<?xml version="1.0" encoding="utf-8"?>

			<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">

			<channel>
			<title>Blog of Shaun McCran - Architecting robust, elegant technical and business solutions - Security</title>
			<link>http://www.mccran.co.uk/index.cfm</link>
			<description>I write about Architecture and Design, Architectural patterns, Architectural Principles and Architectural policies. This includes TOGAF, Zachman, Business Architecture, SOA and Process and tools such as the IBM Rational software and Adobe products. I also write about my previous life as a mobile and web developer.</description>
			<language>en-gb</language>
			<pubDate>Tue, 09 Jun 2026 06:54:14 -0000</pubDate>
			<lastBuildDate>Wed, 21 Nov 2012 04:07:00 -0000</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>shaun@mccran.co.uk</managingEditor>
			<webMaster>shaun@mccran.co.uk</webMaster>
			<itunes:subtitle></itunes:subtitle>
			<itunes:summary></itunes:summary>
			<itunes:category text="Technology" />
			<itunes:category text="Technology">
				<itunes:category text="Podcasting" />
			</itunes:category>
			<itunes:category text="Technology">
				<itunes:category text="Tech News" />
			</itunes:category>
			<itunes:keywords></itunes:keywords>
			<itunes:author></itunes:author>
			<itunes:owner>
				<itunes:email>shaun@mccran.co.uk</itunes:email>
				<itunes:name></itunes:name>
			</itunes:owner>
			
			<itunes:explicit>no</itunes:explicit>
			
			
			
			
			
			<item>
				<title>Razer create a totally unnecessary cloud based system</title>
				<link>http://www.mccran.co.uk/index.cfm/2012/11/21/Razer-create-a-totally-unnecessary-cloud-based-system</link>
				<description>
				
				A recent blog post on &lt;a href=&quot;http://www.overclock.net/t/1319323/razer-synapse-2-0-software-mouse-unusable-if-you-dont-have-an-internet-connection-or-their-servers-are-down&quot; target=&quot;_blank&quot;&gt;www.overclock.net&lt;/a&gt; sparked my interest in a particularly strange decision from Razer. Razer are a hardware manufacturer that produce gaming peripherals, like Mice and Keyboards.

To use your new Razer device as the amazing multi button, Macro driven gaming peripheral  that it was designed as, you have to have an account and a profile with them. Without this account your mouse reverts back to a 2 button standard Microsoft mouse.

To facilitate this account Razer have released a new version of their peripheral profiling software, Synapse 2.0. Synapse 2.0 requires allows you to create an account to store your profile information against, things like settings and device profiles. Users have noticed that this software creates your account in a Cloud space. This has the knock on effect of a user having to be online when they create the account, and being online every time they want to use the device.

&lt;img src=&quot;http://www.mccran.co.uk/images/razer-synapse.jpg&quot; /&gt;

Essentially if you aren&apos;t online then your account cannot be verified and your settings are not used. Now if I were writing requirements for mouse management software, being cloud based would not be one of them. There is one tenuous reason for a cloud based profile (same mouse used on multiple machines) but other than that the only technical reason I can see for doing this is tracking.

Razer just want to know what you are doing. It&apos;s all about usage stats and product tracking. By doing this they now have a profile of exactly which of their devices are in the market, and the numbers of those devices. Couple this with average life of a device and you start to get pretty good sales forecasting, if you can work out how many people will re-purchase one of your products if the existing one fails.

But I can&apos;t shake the feeling that this is a really poor use of a Cloud based solution. The user gains nothing from it at all, and is restricted at a fairly fundamental level if they don&apos;t agree with it. Personally a software firewall will block this every time for me, and I can&apos;t think a decent reason to let it through.
				
				</description>
				
				
				<category>Cloud</category>
				
				<category>Security</category>
				
				<pubDate>Wed, 21 Nov 2012 04:07:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2012/11/21/Razer-create-a-totally-unnecessary-cloud-based-system</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Samsung TouchWiz bug found and squash – in a day</title>
				<link>http://www.mccran.co.uk/index.cfm/2012/9/26/Samsung-TouchWiz-bug-found-and-squash--in-a-day</link>
				<description>
				
				Yesterday (Sept 25th) news site across the web were buzzing with the news that an entrapeneuring type had managed to find an exploit in the Samsung Touchwiz software. It basically allowed foreign code to be run on the phone, without the users authorisation or prompting, that formatted the handset.

&lt;div style=&quot;margin-left:auto; margin-right:auto; width: 200px;&quot;&gt;&lt;img src=&quot;http://www.mccran.co.uk/images/samsung-logo.jpg&quot; /&gt;&lt;/div&gt;

You can read more here:

&lt;a href=&quot;http://techcrunch.com/2012/09/25/got-touchwiz-some-samsung-smartphones-can-be-totally-wiped-by-clicking-a-link/&quot; target=&quot;_blank&quot;&gt;http://techcrunch.com/2012/09/25/got-touchwiz-some-samsung-smartphones-can-be-totally-wiped-by-clicking-a-link/&lt;/a&gt;

By today (Sept 26th) the same news sites are reporting that Samsung have fixed the loophole and are urging users to download the fix for it. So if you are running a Samsung handset then go check for system updates.

&lt;a href=&quot;http://techcrunch.com/2012/09/26/samsung-speedily-plugs-remote-wipe-flaw-urges-galaxy-siii-owners-to-update/&quot; target=&quot;_blank&quot;&gt;http://techcrunch.com/2012/09/26/samsung-speedily-plugs-remote-wipe-flaw-urges-galaxy-siii-owners-to-update/&lt;/a&gt;

That sort of timescale for bug fixes is admirable, whoever you are.
				
				</description>
				
				
				<category>Security</category>
				
				<category>Mobile</category>
				
				<pubDate>Wed, 26 Sep 2012 06:42:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2012/9/26/Samsung-TouchWiz-bug-found-and-squash--in-a-day</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Using url rewriting ( .htaccess or httpd.ini ) to block hot linking resources</title>
				<link>http://www.mccran.co.uk/index.cfm/2011/6/14/Using-url-rewriting--htaccess-or-httpdini--to-block-hot-linking-resources</link>
				<description>
				
				After my recent move to HostMediaUK I&apos;ve been able to see more in depth statistics about one of my sites, including traffic and data usage. This also includes having visibility of other domains that are linking directly to my content. This is popularly known as hot linking, and if you haven&apos;t asked permission is considered very impolite. 
&lt;p&gt;
This also uses up your servers bandwidth rather than theirs.
This article explores how I use a  URL access file, either .htaccess of http.ini depending on your platform, to stop other domains from linking directly to your hosted resources.
&lt;p&gt;
				 [More]
				</description>
				
				
				<category>Security</category>
				
				<category>Isapi rewrite</category>
				
				<category>Server management</category>
				
				<pubDate>Tue, 14 Jun 2011 13:37:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2011/6/14/Using-url-rewriting--htaccess-or-httpdini--to-block-hot-linking-resources</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>The Coldfusion Hash() function decoded - kind of</title>
				<link>http://www.mccran.co.uk/index.cfm/2011/1/23/The-Coldfusion-Hash-function-decoded--kind-of</link>
				<description>
				
				I&apos;ve always believed that using the hash() function in ColdFusion is a one way process. If I wanted to reverse a string I had to use encode() and decode(). The Adobe documentation states that &quot;It is not possible to convert the hash result back to the source string&quot; - &lt;a href=&quot;http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7c52.html&quot; target=&quot;_blank&quot;&gt;Adobe Docs for Hash()&lt;/a&gt;.

Strictly speaking this is still true, but some bright spark has decided to host an MD5 string database and provide a lookup service.
				 [More]
				</description>
				
				
				<category>Security</category>
				
				<category>Coldfusion</category>
				
				<category>Best practices</category>
				
				<pubDate>Sun, 23 Jan 2011 22:29:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2011/1/23/The-Coldfusion-Hash-function-decoded--kind-of</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Permission denied for javascript methods, SSL security error between parent and child windows</title>
				<link>http://www.mccran.co.uk/index.cfm/2010/11/2/Permission-denied-for-javascript-methods-SSL-security-error-between-parent-and-child-windows</link>
				<description>
				
				I recently integrated a postcode lookup service into a checkout process, it constituted a pop up window, with a Webservice http call to return a JSON object of postcode data.

The data itself was returning successfully, and is output into a select field, so that the user can choose one of the address records from the many returned.

The problem I had arose when I ran a script to write the selected address data back from the pop up window to the parent window. Something like this:

&lt;code&gt;

&lt;s/cript type=&quot;text/javascript&quot;&gt;
	$(document).ready(function() {

		$(&apos;.submitButton&apos;).click(function() {

			var selectedPcode = $(&apos;.address&apos;).val();

			if (selectedPcode == undefined) {
				alert(&apos;Please select an address&apos;)
			}

			else {
				//split the string
				var mySplitResult = selectedPcode.split(&quot;,&quot;);

				var street = mySplitResult[0];
				var area = mySplitResult[1];
				var town = mySplitResult[2];

				street = jQuery.trim(street);
				area = jQuery.trim(area);
				town = jQuery.trim(town);

// set the parent form field values
window.opener.document.form.evAddress1.value = street;
window.opener.document.form.evAddress2.value = area;
window.opener.document.form.evTown.value = town;
window.close();

			}

		});
	});
&lt;/s/cript&gt;


&lt;/code&gt;

The code above will just split out the address parts and write them out to the corresponding fields in a form in the parent window. At this point I was seeing an error message:

&lt;code&gt;
Permission denied for javascript.... Line xxx
&lt;/code&gt;

The problem stems from the fact that the parent window is served under SSL and the pop up was not. 

So make sure that your parent and child windows are both served under the same protocol, otherwise I guess it is being stopped as an inject hack, as it appears to be on a different domain.
				
				</description>
				
				
				<category>Security</category>
				
				<category>Javascript</category>
				
				<pubDate>Tue, 02 Nov 2010 15:53:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2010/11/2/Permission-denied-for-javascript-methods-SSL-security-error-between-parent-and-child-windows</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Securing server side Coldfusion code with cfcompile</title>
				<link>http://www.mccran.co.uk/index.cfm/2010/11/1/Securing-server-side-Coldfusion-code-with-cfcompile</link>
				<description>
				
				If you ever need to protect your intellectual property, or you have suspicions that your code maybe be accessed on a server to be tampered with, then your best option is to compile your code base.

This article addresses how to use the cfcompile command, and what it actually does to your code base.
				 [More]
				</description>
				
				
				<category>Security</category>
				
				<category>Coldfusion</category>
				
				<pubDate>Mon, 01 Nov 2010 11:46:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2010/11/1/Securing-server-side-Coldfusion-code-with-cfcompile</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Forcing an SSL redirect using Coldfusion</title>
				<link>http://www.mccran.co.uk/index.cfm/2010/9/7/Forcing-an-SSL-redirect-using-Coldfusion</link>
				<description>
				
				I&apos;ve never really coded much around individual Secure templates, but this afternoon I found myself working in a framework where certain templates were required to be called with the &apos;https&apos; URL instead of standard non secure URLs.

This turns out to be incredibly easy. There is a variable in the cgi scope that tells you if the request is served under a secure port or not, cgi.server_port_secure returns true or false (1/0), so you can use it to redirect people to where they should be.

&lt;code&gt;


&lt;cfif NOT cgi.server_port_secure&gt;

	&lt;cflocation url=&quot;https://#cgi.server_name##cgi.script_name#&quot; 
	addtoken=&quot;false&quot;&gt;

&lt;/cfif&gt;


&lt;/code&gt;

I&apos;ve used other cgi values above as I&apos;ve put this in a &apos;prefuseaction&apos; function in a fusebox CFC controller file. That way all requests to any actions in that file are routed to the SSL equivalent.
				
				</description>
				
				
				<category>Security</category>
				
				<category>Coldfusion</category>
				
				<pubDate>Tue, 07 Sep 2010 14:36:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2010/9/7/Forcing-an-SSL-redirect-using-Coldfusion</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Flex webservices security error accessing url</title>
				<link>http://www.mccran.co.uk/index.cfm/2010/7/23/Flex-webservices-security-error-accessing-url</link>
				<description>
				
				I&apos;ve been working with some client side flash developers recently and we came across an unusual error that was being thrown in a Flex application when we were sending a webservice request to a Coldfusion server.

The error was &quot;Security error accessing URL&quot;. I thought I&apos;d overcome this a long time ago by using the cross-domain.xml file to allow server access to services.

It appears that there is a security issue with Flash 9 that requires the following line to be added to the CrossDomain.xml file:

&lt;code&gt;
&lt;allow-http-request-headers-from domain=&quot;*&quot; headers=&quot;SOAPAction&quot;/&gt;
&lt;/code&gt;

I&apos;m guessing that it is enabling access for SOAP requests to any remote services on that server.
				
				</description>
				
				
				<category>Flex Remoting</category>
				
				<category>Security</category>
				
				<category>Development</category>
				
				<pubDate>Fri, 23 Jul 2010 15:24:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2010/7/23/Flex-webservices-security-error-accessing-url</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Changing the 404 template handler in IIS</title>
				<link>http://www.mccran.co.uk/index.cfm/2010/3/2/Changing-the-404-template-handler-in-IIS</link>
				<description>
				
				You could use a 404 ColdFusion template to handle missing templates, or the onmissingtemplate Application CFC function. Luckily I have a client with half a dozen sites all on the same server, with nothing else on it, so it makes more sense to do this in Internet Information Services.

404 templates are a handy way of masking any site errors or missing templates. Not only are they a cosmetic fix to nasty display errors but they can also seriously help your server security.
				 [More]
				</description>
				
				
				<category>Security</category>
				
				<category>Best practices</category>
				
				<category>Server management</category>
				
				<category>Microsoft</category>
				
				<pubDate>Tue, 02 Mar 2010 15:36:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2010/3/2/Changing-the-404-template-handler-in-IIS</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Internet dating disasters site - Online fraud and security</title>
				<link>http://www.mccran.co.uk/index.cfm/2010/1/20/Internet-dating-disasters-site--Online-fraud-and-security</link>
				<description>
				
				A popular daytime television show in the UK has recently broadcast an article on Internet security and Internet dating. With Online Dating being an industry I worked in for a brief period this was quite relevant to me.

&lt;a href=&quot;http://www.itv.com/lifestyle/thismorning/more/internetdatingdisasters/&quot; target=&quot;_blank&quot;&gt;http://www.itv.com/lifestyle/thismorning/more/internetdatingdisasters/&lt;/a&gt;

The main aim of the Sally Cornock&apos;s site is to warn of &apos;love rats&apos; and suspicious profiles online. It appears that she was stung by a serial dater online and has done something about it.

It highlights the dilemma of free to join, fixed cost membership sites quite well though. Most dating sites are free to join. They provide very little functionality, and no interaction at all with other members UNLESS you upgrade your account and pay a fee. When you understand this it makes policing this near on impossible. 

Sally Cornock has raised the issue of potentially having a governing body to perform validation on members as they join, so that you know someone is who they say they are. This would discourage a massive percentage of the market, as signing up for free by providing only one or two fields of data is simple. But passing an online verification is an extra level of hassle to the &quot;casual shopper&quot;, which most people are. When you look at the statistics only a tiny number of signups ever convert to full membership.

It nicely highlights some of the less technical aspects of web usage, click through below to read more:

&lt;a href=&quot; http://www.crimestoppers-uk.org/crime-prevention/helping-prevent-crime/personal-safety/online-dating-safety &quot; target=&quot;_blank&quot;&gt;http://www.crimestoppers-uk.org/crime-prevention/helping-prevent-crime/personal-safety/online-dating-safety&lt;/a&gt;

&lt;a href=&quot; http://www.e-victims.org/&quot; target=&quot;_blank&quot;&gt;http://www.e-victims.org/&lt;/a&gt;

&lt;a href=&quot; http://www.suzylamplugh.org/personal-safety/personal-safety-tips/safety-on-the-internet/&quot; target=&quot;_blank&quot;&gt;http://www.suzylamplugh.org/personal-safety/personal-safety-tips/safety-on-the-internet/&lt;/a&gt;

&lt;a href=&quot; http://www.victimsupport.org.uk/help%20for%20victims/Get%20information%20victims/Information%20about%20specific%20crimes/Cyber%20crime &quot; target=&quot;_blank&quot;&gt;http://www.victimsupport.org.uk/help%20for%20victims/Get%20information%20victims/Information%20about%20specific%20crimes/Cyber%20crime&lt;/a&gt;
				
				</description>
				
				
				<category>Security</category>
				
				<category>General Interest</category>
				
				<category>Social media</category>
				
				<pubDate>Wed, 20 Jan 2010 17:42:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2010/1/20/Internet-dating-disasters-site--Online-fraud-and-security</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Using Isapi / Apache rewriting to mask URL strings, for cosmetics and security</title>
				<link>http://www.mccran.co.uk/index.cfm/2009/12/22/Using-Isapi--Apache-rewriting-to-mask-URL-strings-for-cosmetics-and-security</link>
				<description>
				
				One of the more recent additions to my Coldfusion frameworks is masking the more ugly URL&apos;s using Isapi rewrite.  In this article I&apos;ll be using Helicon&apos;s Isapi ReWrite, but Apache re write works in much the same way.

Usually in your Coldfusion frameworks, most other technologies as well, you are passing around a variable or two to control the page content, and more often than not it is in the url. It never looks particularly clean if your URL has a long name value query string behind it, like this:

&lt;code&gt;
http://www.mysite.com/index.cfm?variable1=pagename&amp;location=england&amp;value=7
&lt;/code&gt;

&lt;h3&gt;Cosmetic reasons&lt;/h3&gt;

So for two reasons URL rewriting seems like a good idea.

Firstly to mask those ugly URLS with a url rewriter. On a basic level this will re write specified request to the URL you tell it to, taking your ugly list of name value pairs and changing it into a user friend URL. If you are pitching this to a client this looks a lot more professional.

&lt;h3&gt;Security reasons&lt;/h3&gt;

Secondly there is an added security benefit here. The URL gives a lot away about a website, like what the code base is, and is potentially a window on the internal workings of a website. Take a normal FuseBox application for example. The normal URL might be:

&lt;code&gt;
www.mysite.com/index.cfm?fuseaction=controller.action&amp;othervalues=values
&lt;/code&gt;

From here it is very easy to start messing around with the controller names, trying to dig out an &apos;admin&apos; controller, or other common function controller. Similarly adding values to pages where it is obvious a Query has been fired is an easy way of testing of the developer is using &apos;cfQueryParam&apos;, with potentially disastrous results.

Along the same lines it is quite simple to inject form values into the URL (like this &lt;a href=&quot;http://www.mccran.co.uk/index.cfm/2009/7/30/Cross-site-Script-hacking-using-the-GET-method&quot;&gt;http://www.mccran.co.uk/index.cfm/2009/7/30/Cross-site-Script-hacking-using-the-GET-method&lt;/a&gt;). By masking the URL and the values you make it considerably more difficult to do this, after all if you can see or get to the URL, how can you fool around with it?

So far I am implementing a rewrite script that will rewrite URLs into friendly strings, here is a modified version of the .htaccess file I&apos;m using.

&lt;code&gt;
# Helicon ISAPI_Rewrite configuration file
# Version 3.1.0.68

RewriteEngine on
RewriteBase /wwwroot/

#generic
RewriteRule requestID/(.*)/(.*)/ index.cfm?decryptURL=$1&amp;params=$2

# site pages
RewriteRule home(/)? index.cfm?go=controller.home
RewriteRule contact(/)? index.cfm?go=controller.contact
RewriteRule login(/)? index.cfm?go=controller.login
RewriteRule privacy(/)? index.cfm?go=controller.privacy
RewriteRule about(/)? index.cfm?go=controller.about
RewriteRule faqs(/)? index.cfm?go=controller.faqs
RewriteRule search(/)? index.cfm?go=controller.search
&lt;/code&gt;

This code starts off by turning the rewriteEngine on, then setting the rewriteBase, this is typically your webroot, or the root of the site the file is for. Then it rewrites any URL params to the URL string.

The main part of the code is where we set individual rewriteRule&apos;s for each URL. The first example (home) looks for any URL requests to the &apos;home&apos; string, and re writes this to the URL in the regular expression (index.cfm?go=controller.home).  
Pretty straight forward really. 

There is a lot more you can do with this, and hopefully I&apos;ll get to explore rewriting in more depth in the future.
				
				</description>
				
				
				<category>Software Architecture</category>
				
				<category>Security</category>
				
				<category>Development</category>
				
				<pubDate>Tue, 22 Dec 2009 22:44:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2009/12/22/Using-Isapi--Apache-rewriting-to-mask-URL-strings-for-cosmetics-and-security</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Cross site Script hacking using the GET method</title>
				<link>http://www.mccran.co.uk/index.cfm/2009/7/30/Cross-site-Script-hacking-using-the-GET-method</link>
				<description>
				
				I&apos;ve dealt with Cross Site scripting (XSS) attacks before (&lt;a href=http://www.mccran.co.uk/index.cfm/2009/4/6/Cross-Site-scripting-hack-test-form&gt; http://www.mccran.co.uk/index.cfm/2009/4/6/Cross-Site-scripting-hack-test-form&lt;/a&gt;), so I&apos;m familiar with the principles involved. In this example there is a subtle difference.

In the example above the vulnerability was created by POSTING a text string through the form action. In this example we will examine a similar vulnerability using GET. IE we will simply pass the attacking string through the url of the form, setting the form field value in the traditional &apos;url?variable=N&apos; way.

To demonstrate this create a simple form:

&lt;code&gt;
&lt;cfparam name=&quot;attributes.formValue&quot; default=&quot;&quot;&gt;

&lt;form&gt;

&lt;input type=&quot;text&quot; name=&quot;formValue&quot; size=&quot;20&quot; value=&quot;&lt;cfoutput&gt;#attributes.formValue#&lt;/cfoutput&gt;&quot;&gt;
&lt;input type=&quot;submit&quot; name=&quot;Action&quot; value=&quot;Send&quot;&gt;

&lt;/form&gt;
&lt;/code&gt;

Call your form in a browser. Now append on the end of that url the text string below.


?attributes.formValue==&gt;&quot;&gt;&lt;%2Ftitle&gt;&lt;%2Fiframe&gt;&lt;%2Fscript&gt;&lt;%2Fform&gt;&lt;%2Ftd&gt;&lt;%2Ftr&gt;&lt;br&gt;&lt;iFraMe+src%3Dhttp%3A%2F%2Fwww.google.com+width%3D900+height%3D1100&gt;&lt;%2FIfRamE&gt;


Reading through the string you&apos;ll notice that it is an Iframe constructor that is calling a url, in this case www.Google.com.

As the url is setting the value of &apos;attributes.formValue&apos; this will be inserted into the form on the submit action. We are not posting it, so it will not be picked up by any custom POST action code.

One interesting point to mention here is that testing this in IE 8, it will actually be blocked by default, as it has detected that scripts are running over different domains.

&lt;img src=&quot;http://www.mccran.co.uk/images/ie_xxs.gif&quot; title=&quot;IE Blocking XXS&quot; /&gt;

So if you are in the habit of writing POST detection scripts, make sure you handle any other submissions as well!
				
				</description>
				
				
				<category>Security</category>
				
				<category>Coldfusion</category>
				
				<category>Best practices</category>
				
				<category>Internet Explorer</category>
				
				<pubDate>Thu, 30 Jul 2009 14:57:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2009/7/30/Cross-site-Script-hacking-using-the-GET-method</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Basic fusebox fuseaction to handle security references</title>
				<link>http://www.mccran.co.uk/index.cfm/2009/7/9/Basic-fusebox-fuseaction-to-handle-security-references</link>
				<description>
				
				I am a big fan of fusebox, I like the way it handles inheritance,  and I love the fact that it instinctively lends itself to a modular approach.

Part of the strength in using fusebox is in knowing exactly when each of the framework fuse actions run, and just what sort of functionality you can embed in them. In this case I&apos;m using the &quot;Pre fuse Action&quot; to perform a basic security validation on any fuseactions in that circuit.

&lt;code&gt;
	&lt;cffunction name=&quot;prefuseaction&quot;&gt;
		&lt;cfargument name=&quot;myFusebox&quot; /&gt;
		&lt;cfargument name=&quot;event&quot; /&gt;


	&lt;/cffunction&gt;
&lt;/code&gt;

Above is a blank prefuseaction, insert any code you want to perform on any of the other fuseactions in that circuit here. Note that it runs before the circuit action.

A basic session validation script could be something like:

&lt;code&gt;
		&lt;!--- check that user is logged in ---&gt;
		&lt;cfif NOT isdefined(&apos;session.loggedIn&apos;)&gt;
			&lt;cfset session.logoutMsg = &quot;Your session has timed out, please login again&quot;&gt;
			&lt;cflocation url=&quot;index.cfm&quot;&gt;
			
			&lt;cfif NOT isdefined(&apos;session.superadmin&apos;)&gt;
				&lt;cfset session.logoutMsg = &quot;You do not have sufficient rights to view Super admin functions&quot;&gt;
				&lt;cflocation url=&quot;index.cfm&quot;&gt;
			&lt;/cfif&gt;

		&lt;/cfif&gt;

&lt;/code&gt;

In the code above I am checking for a valid session variables, and if it is not there sets an error message and redirects to the homepage.

This is a pretty basic &quot;catch all - are you logged in?&quot; type query, but if you have an administration circuit then it provides good basic fuseaction protection. I&apos;ve extended it out one step further by creating a cfc call to this code which just returns true/false. Something like this:

&lt;code&gt;
&lt;cfif application.security.check()&gt;true&lt;cfelse&gt;false&lt;/cfif&gt;
&lt;/code&gt;

I am currently extending this further with more robust security, and user roles and groups.
				
				</description>
				
				
				<category>Security</category>
				
				<category>Development</category>
				
				<category>Coldfusion</category>
				
				<category>Best practices</category>
				
				<pubDate>Thu, 09 Jul 2009 10:50:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2009/7/9/Basic-fusebox-fuseaction-to-handle-security-references</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>Coldfusion dropping session ID in fusebox application</title>
				<link>http://www.mccran.co.uk/index.cfm/2009/7/2/Coldfusion-dropping-session-ID-in-fusebox-application</link>
				<description>
				
				I recently rolled out beta version of a new application I&apos;ve been writing, only to discover that there was a bizarre session problem that didn&apos;t exist in dev, but does in live.

I&apos;ve worked it out, but I thought I&apos;d explore it some more.  It is a fusebox 5.5 non xml application. The error I had was that as soon as I made a call through a &quot;new&quot; circuit, IE one I hadn&apos;t called before ColdFusion would generate a new session ID, and thus invalidate my current active session.

Looking through my application CFC I had this line of code present.

&lt;code&gt;
&lt;cfset this.SetClientCookies = false /&gt;
&lt;/code&gt;

Setting this to true fixed the issue. This is because ColdFusion relies on the CFID and CFTOKEN to maintain the session state. You can either pass these two variables through the URL on every page request, which is a bit messy, or you can use a cookie. It is the variable above that lets the application use cookies on the user&apos;s session.

The problem with setClientCookies is that it is persistent, IE it is built for that session, and left on the user&apos;s pc, even after the session has expired, or they have left the application. Also some users will accept per-session cookies, but not persistent session cookies.

They are a lot more secure as per-session cookies, as they cannot be duplicated and hacked to spoof a previous user&apos;s session, and if you pass the token through the URL it is easy changed.

You could put something like this in your onRequestend function in application.cfc

&lt;code&gt;
&lt;cfif IsDefined(&quot;Cookie.CFID&quot;) AND
IsDefined(&quot;Cookie.CFTOKEN&quot;)&gt;
&lt;cfset cfid_local = Cookie.CFID&gt;
&lt;cfset cftoken_local = Cookie.CFTOKEN&gt;
&lt;cfcookie name=&quot;CFID&quot; value=&quot;#cfid_local#&quot;&gt;
&lt;cfcookie name=&quot;CFTOKEN&quot; value=&quot;#cftoken_local#&quot;&gt;
&lt;/cfif&gt;
&lt;/code&gt;

This will make them per-session. I originally thought that it was something to do with the Fusebox framework, but I had overlooked the simple fact that it was still a new page request, so would be lost. Although this doesn&apos;t explain why I wasn&apos;t getting this error in my development environment but did in live.
				
				</description>
				
				
				<category>Security</category>
				
				<category>Development</category>
				
				<category>Coldfusion</category>
				
				<category>Best practices</category>
				
				<pubDate>Thu, 02 Jul 2009 15:53:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2009/7/2/Coldfusion-dropping-session-ID-in-fusebox-application</guid>
				
				
			</item>
			
		 	
			
			
			<item>
				<title>IE 8 Https security warning pop up prompt annoyances</title>
				<link>http://www.mccran.co.uk/index.cfm/2009/6/19/IE-8-Https-security-warning-pop-up-prompt-annoyances</link>
				<description>
				
				With the continue rollout of IE 8 some issues rise to the top of pile in the way the browser interacts with users. I can see &apos;why&apos; this next issue occurs, but it doesn&apos;t handle the user interaction very well at all.

One of the more significant changes is the way that IE handles security exceptions. The message to the user has been changed to be inversed. Usually a user will look for an &apos;ok&apos; button, but in this instance &apos;ok&apos; is the wrong answer (see screenshot).

&lt;img src=&quot;http://www.mccran.co.uk/images/images//securityWarning.jpg&quot; title=&quot;IE 8 Security Warning&quot;&gt;

This pop up happens when the site you are on is serving up non https content on an https URL, IE images and style links that are http://url/image.src rather than https://.

The only work around for this seems to be either having a user manually edit their IE settings, like this:

&lt;code&gt;
Tools &gt; internet options &gt; security &gt; custom level &gt; display mixed content: Enable
&lt;/code&gt;

&lt;img src=&quot;http://www.mccran.co.uk/images/images//ieSetting.jpg&quot;&gt;

This isn&apos;t exactly reasonable though. The other fix is to change all your content to be https. This is potentially a huge code change depending on how your site works.

I was hoping to find an IE 8 compatibility setting to revert this back to the same handling method as IE 7, but that doesn&apos;t seem to exist. If anyone has any ideas feel free to comment!
				
				</description>
				
				
				<category>Security</category>
				
				<category>Best practices</category>
				
				<category>HTML</category>
				
				<category>Web technologies</category>
				
				<pubDate>Fri, 19 Jun 2009 11:57:00 -0000</pubDate>
				<guid>http://www.mccran.co.uk/index.cfm/2009/6/19/IE-8-Https-security-warning-pop-up-prompt-annoyances</guid>
				
				
			</item>
			
		 	
			</channel></rss>