<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc = "http://purl.org/dc/elements/1.1/" xmlns="http://purl.org/rss/1.0/">
	<channel rdf:about="http://livedocs.adobe.com/">
	<title>LiveDocs Comments - coldfusion - 7 - htmldocs - 00000284.htm</title>	
		<link>http://livedocs.adobe.com/</link>
		<description>Macromedia LiveDocs - online documentation with user feedback.</description>
		<copyright>Copyright 2009, Macromedia, Inc.</copyright>
		<dc:date>2009-11-25T23:59:48</dc:date>
		<dc:language>en-us</dc:language>
		<items>
			<rdf:Seq>
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000284.htm#85707" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000284.htm#39744" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000284.htm#38786" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000284.htm#38752" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000284.htm#35477" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000284.htm#30520" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000284.htm#30177" />
			</rdf:Seq>
		</items>
	</channel>
	
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000284.htm#85707">
		<title>coldfusion/7/htmldocs/00000284.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000284.htm#85707</link>
		<description>There appears to be no way to make &lt;cflocation&gt; default to addtoken=&quot;false&quot; - If you don't want tokens you must specify addtoken=&quot;false&quot; for every single &lt;cflocation&gt; tag.&lt;br /&gt;&lt;br /&gt;The following trick will fix that.  Put this at the start of every request: (I put mine in the onRequest function)  This will cause there to never be any tokens regardless of the setting of addtoken&lt;br /&gt;&lt;br /&gt;&lt;cfset StructDelete(session, &quot;urltoken&quot;) &gt;</description>
		<dc:creator></dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2008-07-13T21:11:39</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000284.htm#39744">
		<title>coldfusion/7/htmldocs/00000284.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000284.htm#39744</link>
		<description>We had the same problem, and in addition to the previous solution, here's another method that works:&lt;br /&gt;&lt;br /&gt;Change:&lt;br /&gt;&lt;CFLOCATION URL=&quot;myTemplate.cfm?myVar=#URLEncodedFormat(Encrypt(myValue, myKey))#&quot; ADDTOKEN=&quot;Yes&quot;&gt;&lt;br /&gt;&lt;br /&gt;To:&lt;br /&gt;&lt;CFLOCATION URL=&quot;myTemplate.cfm?myVar=#URLEncodedFormat(Trim(Encrypt(myValue, myKey)))#&quot; ADDTOKEN=&quot;Yes&quot;&gt;&lt;br /&gt;&lt;br /&gt;Adding Trim() around the Encrypt() function fixes this.</description>
		<dc:creator>Giskard</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-09-21T06:40:21</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000284.htm#38786">
		<title>coldfusion/7/htmldocs/00000284.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000284.htm#38786</link>
		<description>I have found a solution to my problem listed earlier.&lt;br /&gt;&lt;br /&gt;Change:&lt;br /&gt;&lt;cflocation url=&quot;myTemplate.cfm?myVar=#URLEncodedFormat(Encrypt(form.User,&quot;somekey&quot;))#&quot; ADDTOKEN=&quot;Yes&quot;&gt;&lt;br /&gt;&lt;br /&gt;To:&lt;br /&gt;&lt;cflocation url=&quot;myTemplate.cfm?myVar=#Encrypt(form.User,&quot;somekey&quot;,&quot;CFMX_COMPAT&quot;, Hex&quot;)#&quot; ADDTOKEN=&quot;Yes&quot;&gt;&lt;br /&gt;&lt;br /&gt;The 4th parameter &quot;Hex&quot; will convert the encrypted data to a hex stream which can be passed on the URL even though LF and CR may be embedded in it.  Of course, you have to also add the 3rd and 4th parms to the Decrypt() statements to make it work.&lt;br /&gt;&lt;br /&gt;Another bonus is that URLEncodedFormat() is not needed because there will be no special characters in the hex stream.</description>
		<dc:creator>sjibben</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-08-18T20:53:13</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000284.htm#38752">
		<title>coldfusion/7/htmldocs/00000284.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000284.htm#38752</link>
		<description>This change also breaks another implementation of URLEncodedFormat.&lt;br /&gt;&lt;br /&gt;For example, it is very common for developers to use the following syntax for encrypting URL variables:&lt;br /&gt;&lt;br /&gt;&lt;cflocation url=&quot;myTemplate.cfm?myVar=#URLEncodedFormat(Encrypt(form.User,&quot;somekey&quot;))#&quot; ADDTOKEN=&quot;Yes&quot;&gt;&lt;br /&gt;&lt;br /&gt;This works fine until Encrypt translates a perfectly normal user variable like 'JoeCool' to include CR or LF characters.  Even though URLEncodedFormat is working correctly CFLocation throws an error.  So, how is it possible to even encrypt URL variables with this implementation of CFLocation???&lt;br /&gt;&lt;br /&gt;This needs to be corrected!</description>
		<dc:creator>sjibben</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-08-17T14:26:56</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000284.htm#35477">
		<title>coldfusion/7/htmldocs/00000284.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000284.htm#35477</link>
		<description>The problem is not line feeds, but URL encoded strings.&lt;br /&gt;&lt;br /&gt;%0A and %0D ( chr(10), chr(13) ) are actually okay, and will not cause http response splitting.&lt;br /&gt;&lt;br /&gt;Essentially an  response header is given to the browser. If an attacker makes the first thing a line break then can fool IE or Mozzilla into displaying content. &lt;br /&gt;&lt;br /&gt;The problem in the document is that PHP was incorrectly take %0A and %0D and putting it in there. If CF does not URL decode the values then IE or Mozzila would not break.,&lt;br /&gt;&lt;br /&gt;Furthermore the attack only works if the line feed is the first characters like to make the response looks something like this.&lt;br /&gt;&lt;br /&gt;HTTP 302&lt;br /&gt;Location:&lt;br /&gt;HTTP 220&lt;br /&gt;Look at me I think I'm a cool hacker.&lt;br /&gt;&lt;br /&gt;I want this to happen in my code.&lt;br /&gt;&lt;br /&gt;HTTP 302&lt;br /&gt;Location:http://www.somesite.com/index.cfm?variable=%0A%Dae%2D&lt;br /&gt;&lt;br /&gt;I'm really irritated that &lt;br /&gt;&lt;br /&gt;A) they just stuck this in without telling anyone.&lt;br /&gt;B) it ignore the switch to protect against cross site scripting that is in the administrator&lt;br /&gt;C) That Macromedia is being take such a crappy stance on this. They did not all site around and really think about whether or not the solution was correct, just read some &quot;tech doc&quot; about it and stuck it in. &lt;br /&gt;&lt;br /&gt;Please correct this problem. It is a bug, regardless of whether it was intential or not.</description>
		<dc:creator>twillerror</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-06-14T08:52:32</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000284.htm#30520">
		<title>coldfusion/7/htmldocs/00000284.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000284.htm#30520</link>
		<description>Yes. I believe that the full CF7 error is:&lt;br&gt;&lt;br&gt;	Failed to perform redirection.  &lt;br&gt;	ColdFusion was unable to perform the CFLOCATION operation. &lt;br&gt;	Location URL cannot contain (carriage return) CR or (line feed) LF characters  &lt;br&gt;&lt;br&gt;The rule that CR and LF characters are not allowed in headers was added to CF7.&lt;br&gt;This is a general rule for all headers - including the headers created by &lt;cflocation&gt;.&lt;br&gt;&lt;br&gt;This is an intentional change in CF7 to deter &quot;split-response&quot; security attacks, like those described in:&lt;br&gt;http://www.packetstormsecurity.org/papers/general/whitepaper_httpresponse.pdf &lt;br&gt;http://seclists.org/lists/webappsec/2004/Jan-Mar/0263.html</description>
		<dc:creator>jrunrandy</dc:creator>
		<dc:type>1 1</dc:type>
		<dc:date>2005-03-29T13:52:59</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/coldfusion/7/htmldocs/00000284.htm#30177">
		<title>coldfusion/7/htmldocs/00000284.htm</title>
		<link>http://livedocs.adobe.com/coldfusion/7/htmldocs/00000284.htm#30177</link>
		<description>CFLocation has a bug whereby it unduly fails when a carriage-return, or line-feed, is properly encoded in a url parameter.&lt;br /&gt;&lt;br /&gt;Consider the following code -- which simulates a typical user input being passed in the URL:&lt;br /&gt;&lt;br /&gt;    &lt;cfscript&gt;&lt;br /&gt;        sCR_LF          = Chr (13) &amp; Chr (10);&lt;br /&gt;        sRawRemarks     = &quot;First Line. #sCR_LF# Second Line. #sCR_LF#&quot;;&lt;br /&gt;        sEncodedRemarks = URLEncodedFormat (sRawRemarks);&lt;br /&gt;    &lt;/cfscript&gt;&lt;br /&gt;&lt;br /&gt;    &lt;cflocation addtoken=&quot;no&quot;  url=&quot;#CGI.SCRIPT_NAME#?sRemarks=#sEncodedRemarks#&quot;&gt;&lt;br /&gt;&lt;br /&gt;The script name is legal.  The URL variable, &quot;sRemarks&quot;, has a legal value.&lt;br /&gt;Yet cflocation trips an exception saying &quot;Failed to perform redirection.&quot;</description>
		<dc:creator>MikerRoo</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2005-03-18T21:11:05</dc:date>
	</item>
	</rdf:RDF>

