<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.iis.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:cs="http://blogs.iis.net/"><channel><title>Just Another IIS Blog : security</title><link>http://blogs.iis.net/thomad/archive/tags/security/default.aspx</link><description>Tags: security</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>IIS7 rejecting URLs containing + </title><link>http://blogs.iis.net/thomad/archive/2007/12/17/iis7-rejecting-urls-containing.aspx</link><pubDate>Mon, 17 Dec 2007 23:52:00 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:2064681</guid><dc:creator>thomad</dc:creator><slash:comments>0</slash:comments><description>&lt;P&gt;If your application has a&amp;nbsp;custom handler you might run into the following error message:&lt;/P&gt;
&lt;H4&gt;HTTP Error 404.11&lt;BR&gt;The request filtering module is configured to deny a request that contains a double escape sequence.&lt;/H4&gt;
&lt;P&gt;&lt;IMG title="Request Filter error message" style="WIDTH: 448px; HEIGHT: 246px" height=246 alt="Request Filter error message" src="http://blogs.iis.net/blogs/thomad/40411.jpg" width=448 mce_src="http://blogs.iis.net/blogs/thomad/40411.jpg"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the deal. The IIS7 request filter rejects URLs containing + characters. We do this because the + character is a dangerous choice. Some standards, e.g. the CGI standard require +'s to be converted into spaces. This can become a problem if you have code that implements name-based rules, for example urlauthorization rules that base their decisions on some part of the url. &lt;BR&gt;&lt;U&gt;Here is a cooked up example:&lt;/U&gt;&amp;nbsp;&lt;BR&gt;Let's suppose you have code that evaluates the following rule: &lt;BR&gt;&lt;STRONG&gt;&amp;lt;authorization vdir="my vdir"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;allowed users="Administrators"/&amp;gt;&lt;BR&gt;&amp;lt;/authorization&amp;gt;&lt;/STRONG&gt;&lt;BR&gt;With the ambiguity of leaving +'s in place or converting +'s to&amp;nbsp;spaces there is a possiblity that your rule engine&amp;nbsp;allows access to a non-Admin, for example if the attacker enters &lt;A href="http://myserver/my+vdir"&gt;http://myserver/my+vdir&lt;/A&gt;. The "my vdir" authorization rule won't match because your authorization code&amp;nbsp;searches for the string "my+vdir" but your rule says "my vdir". Your rule won't apply and the attacker gets access. &lt;/P&gt;
&lt;P&gt;If you absolutely want to have spaces you can simply turn off the doubleEscaping feature for your application, for your site or for the whole server. Here is an example:&lt;/P&gt;
&lt;P&gt;%windir%\system32\inetsrv\appcmd set config "Default Web Site" -section:system.webServer/security/requestfiltering -allowDoubleEscaping:true&lt;/P&gt;&lt;img src="http://blogs.iis.net/aggbug.aspx?PostID=2064681" width="1" height="1"&gt;</description><category domain="http://blogs.iis.net/thomad/archive/tags/IIS7/default.aspx">IIS7</category><category domain="http://blogs.iis.net/thomad/archive/tags/security/default.aspx">security</category><category domain="http://blogs.iis.net/thomad/archive/tags/request+filter/default.aspx">request filter</category></item></channel></rss>