<?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>Casaba Security &#187; HTTP</title>
	<atom:link href="http://www.casaba.com/blog/tag/http/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.casaba.com/blog</link>
	<description>Building and breaking software and robots</description>
	<lastBuildDate>Wed, 11 Jan 2012 18:08:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>useUnsafeHeaderParsing = what?</title>
		<link>http://www.casaba.com/blog/2008/06/useunsafeheaderparsing-what/</link>
		<comments>http://www.casaba.com/blog/2008/06/useunsafeheaderparsing-what/#comments</comments>
		<pubDate>Thu, 05 Jun 2008 22:02:31 +0000</pubDate>
		<dc:creator>Chris Weber</dc:creator>
				<category><![CDATA[Code Review]]></category>
		<category><![CDATA[Security Testing]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[HTTP]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[As software security people we usually like input restrictions to be tight. With .Net&#39;s HttpWebRequestElement.UseUnsafeHeaderParsing Property you can loosen up the way HTTP requests get parsed. Setting this property ignores validation errors that occur during HTTP parsing. The documentation from MSDN makes it pretty clear. When this property is set to &#039;true&#039; then many HTTP [...]]]></description>
			<content:encoded><![CDATA[<p>
As software security people we usually like input restrictions to be tight.  With .Net&#39;s <a href="http://msdn.microsoft.com/en-us/library/system.net.configuration.httpwebrequestelement.useunsafeheaderparsing(VS.80).aspx" target="_blank">HttpWebRequestElement.UseUnsafeHeaderParsing</a> Property you can loosen up the way HTTP requests get parsed.
</p>
<p>
Setting this property ignores validation errors that occur during HTTP parsing.  The documentation from MSDN makes it pretty clear.  When this property is set to &#039;true&#039; then many HTTP RFC violations will be relaxed and ignored.
</p>
<blockquote style="font-family: Courier New;"><p>
When this property is set to false, the following validations are performed during HTTP parsing:</p>
<p>    *  In end-of-line code, use CRLF; using CR or LF alone is not allowed.<br />
    *  Headers names should not have spaces in them.<br />
    *  If multiple status lines exist, all additional status lines are treated as malformed header name/value pairs.<br />
    *  The status line must have a status description, in addition to a status code.<br />
    *  Header names cannot have non-ASCII chars in them. This validation is performed whether this property is set to true or false.</p>
<p>When a protocol violation occurs, a WebException exception is thrown with the status set to ServerProtocolViolation. If the UseUnsafeHeaderParsing property is set to true, validation errors are ignored.</p>
<p>Setting this property to true has security implications, so it should only be done if backward compatibility with a server is required.
</p>
</blockquote>
<p>Let&#039;s keep an eye out for this option when it&#039;s set either programmatically or through web.config.</p>
<p><code><br />
&lt;configuration&gt;<br />
    &lt;system.net&gt;<br />
        &lt;settings&gt;<br />
            &lt;httpWebRequest useUnsafeHeaderParsing=”true” /&gt;<br />
        &lt;/settings&gt;<br />
    &lt;/system.net&gt;<br />
&lt;/configuration&gt;<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.casaba.com/blog/2008/06/useunsafeheaderparsing-what/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

