<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: CFLOCATION behavior change in CFMX7</title>
	<atom:link href="http://awads.net/wp/2005/06/29/cflocation-behavior-change-in-cfmx7/feed/" rel="self" type="application/rss+xml" />
	<link>http://awads.net/wp/2005/06/29/cflocation-behavior-change-in-cfmx7/</link>
	<description>News, views, tips and tricks on Oracle and other fun stuff</description>
	<pubDate>Fri, 21 Nov 2008 02:51:13 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Marcel</title>
		<link>http://awads.net/wp/2005/06/29/cflocation-behavior-change-in-cfmx7/#comment-49987</link>
		<dc:creator>Marcel</dc:creator>
		<pubDate>Wed, 13 Sep 2006 22:57:53 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/?p=42#comment-49987</guid>
		<description>&lt;p&gt;I started to type a long story describing my problem i was working on...
Then suddenly, it the cause popped into my head... I just tried and indeed it was the problem...&lt;/p&gt;

&lt;p&gt;Let me now explain, maybe other people can use it, as i was 5 hours busy with it:&lt;/p&gt;

&lt;p&gt;If you have a referring URL on another site like:&lt;/p&gt;

&lt;p&gt;http://online-image-editor.com/index.cfm?fa=image_editor&#38;id=aaaaa
The visitor is entering with that path.&lt;/p&gt;

&lt;p&gt;Now i add some session variables, and the next thing i redirect it with cflocation to: http://www.online-image-editor.com/index.cfm&lt;/p&gt;

&lt;p&gt;If you do this with Explorer browser, things work fine.
However, if you do this with a FireFox browser, things will fail :-(&lt;/p&gt;

&lt;p&gt;For some reason Colffusion is giving different session id's to FireFox when the URL is with 'www' or without it.&lt;/p&gt;

&lt;p&gt;So when the visitor first visits the page with URL http://online-image-editor.com/ the session id gets different when it is 'redirected' to http://www.online-image-editor.com. Thus failing then to retrieve the session variables you just put before the redirect.&lt;/p&gt;

&lt;p&gt;I hope you have use from this information&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I started to type a long story describing my problem i was working on&#8230;<br />
Then suddenly, it the cause popped into my head&#8230; I just tried and indeed it was the problem&#8230;</p>
<p>Let me now explain, maybe other people can use it, as i was 5 hours busy with it:</p>
<p>If you have a referring URL on another site like:</p>
<p><a href="http://online-image-editor.com/index.cfm?fa=image_editor&amp;id=aaaaa" rel="nofollow">http://online-image-editor.com/index.cfm?fa=image_editor&amp;id=aaaaa</a><br />
The visitor is entering with that path.</p>
<p>Now i add some session variables, and the next thing i redirect it with cflocation to: <a href="http://www.online-image-editor.com/index.cfm" rel="nofollow">http://www.online-image-editor.com/index.cfm</a></p>
<p>If you do this with Explorer browser, things work fine.<br />
However, if you do this with a FireFox browser, things will fail <img src='http://awads.net/wp/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>For some reason Colffusion is giving different session id&#8217;s to FireFox when the URL is with &#8216;www&#8217; or without it.</p>
<p>So when the visitor first visits the page with URL <a href="http://online-image-editor.com/" rel="nofollow">http://online-image-editor.com/</a> the session id gets different when it is &#8216;redirected&#8217; to <a href="http://www.online-image-editor.com" rel="nofollow">http://www.online-image-editor.com</a>. Thus failing then to retrieve the session variables you just put before the redirect.</p>
<p>I hope you have use from this information</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ray Horn</title>
		<link>http://awads.net/wp/2005/06/29/cflocation-behavior-change-in-cfmx7/#comment-432</link>
		<dc:creator>Ray Horn</dc:creator>
		<pubDate>Tue, 06 Dec 2005 15:08:04 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/?p=42#comment-432</guid>
		<description>&lt;p&gt;Yes, but if you encrypt the string as a series of Hex digits rather than the default method there should be no problems in passing the encrypted Hex digit format via a URL.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Yes, but if you encrypt the string as a series of Hex digits rather than the default method there should be no problems in passing the encrypted Hex digit format via a URL.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eddie</title>
		<link>http://awads.net/wp/2005/06/29/cflocation-behavior-change-in-cfmx7/#comment-21</link>
		<dc:creator>Eddie</dc:creator>
		<pubDate>Wed, 06 Jul 2005 23:10:12 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/?p=42#comment-21</guid>
		<description>The problem is that any encrypted string that contains carriage return (CR) and line feed (LF) characters will fail. For example, the following will not work with ColdFusion MX 7 even if you URLEncode the encrypted string:

    template1.cfm
    ---------------
    &lt;cfset docid = encrypt ( '12345','password')&gt;
    &lt;cflocation 
    url = 'template2.cfm?docid=#urlencodedformat(docid)#'
    addtoken='Yes'&gt;

    template2.cfm
    ---------------
    &lt;cfset docid = decrypt(url.docid,'password')&gt;
    &lt;cfoutput&gt;docid=#docid#&lt;/cfoutput&gt;

Now, following Matt Robertson's advice, you could change the way the string is encrypted. By tweaking the example above, we can make it work:

    template1.cfm
    ---------------
    &lt;cfset docid = 
     encrypt ( '12345', 'password', 'BLOWFISH', 'Hex')&gt;
    &lt;cflocation 
    url = 'template2.cfm?docid=#urlencodedformat(docid)#'
    addtoken='Yes'&gt;

    template2.cfm
    ---------------
    &lt;cfset docid = 
    decrypt(url.docid, 'password', 'BLOWFISH', 'Hex')&gt;
    &lt;cfoutput&gt;docid=#docid#&lt;/cfoutput&gt;

I'm not sure whether this is a full proof solution or not, but at least it works in this example.</description>
		<content:encoded><![CDATA[<p>The problem is that any encrypted string that contains carriage return (CR) and line feed (LF) characters will fail. For example, the following will not work with ColdFusion MX 7 even if you URLEncode the encrypted string:</p>
<p>    template1.cfm<br />
    &#8212;&#8212;&#8212;&#8212;&#8212;<br />
    <cfset docid = encrypt ( '12345','password')><br />
    <cflocation url = 'template2.cfm?docid=#urlencodedformat(docid)#'<br />
    addtoken='Yes'></p>
<p>    template2.cfm<br />
    &#8212;&#8212;&#8212;&#8212;&#8212;<br />
    <cfset docid = decrypt(url.docid,'password')><br />
    <cfoutput>docid=#docid#</cfoutput></p>
<p>Now, following Matt Robertson&#8217;s advice, you could change the way the string is encrypted. By tweaking the example above, we can make it work:</p>
<p>    template1.cfm<br />
    &#8212;&#8212;&#8212;&#8212;&#8212;<br />
    </cfset><cfset docid =<br />
     encrypt ( '12345', 'password', 'BLOWFISH', 'Hex')><br />
    <cflocation url = 'template2.cfm?docid=#urlencodedformat(docid)#'<br />
    addtoken='Yes'></p>
<p>    template2.cfm<br />
    &#8212;&#8212;&#8212;&#8212;&#8212;<br />
    <cfset docid =<br />
    decrypt(url.docid, 'password', 'BLOWFISH', 'Hex')><br />
    <cfoutput>docid=#docid#</cfoutput></p>
<p>I&#8217;m not sure whether this is a full proof solution or not, but at least it works in this example.</cfset></cflocation></cfset></cflocation></cfset></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Robertson</title>
		<link>http://awads.net/wp/2005/06/29/cflocation-behavior-change-in-cfmx7/#comment-20</link>
		<dc:creator>Matt Robertson</dc:creator>
		<pubDate>Wed, 06 Jul 2005 21:55:52 +0000</pubDate>
		<guid isPermaLink="false">http://awads.net/wp/?p=42#comment-20</guid>
		<description>You could also change your encryption so that you are creating a url-safe string.</description>
		<content:encoded><![CDATA[<p>You could also change your encryption so that you are creating a url-safe string.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
