views:

742

answers:

1

Hi,

I'm working on a legacy app and for whatever reason it's trying to stuff URL-encoded angle brackets into a URL. For example, to get a URL ending with "<sometext>":

http://somesite.com/somefolder/%3csometext%3e

When the above URL-encoded URL is fetched, it generates a 400 error (Bad Request) on IIS6 and I can't quite figure out why. Probably something simple, but I'm stumped.

Ideas? Thanks.

+3  A: 

You must have URLScan tool installed (http://technet.microsoft.com/en-us/security/cc242650.aspx) which disallows angle brackets (in any form).

According to this,

    The new default urlscan.ini contains a rule in it to protect against these sort of patterns and the rule is just simply:

[DenyQueryStringSequences]

<

>
DV
That's preposterous!
eyelidlessness
why so? urlscan is very common on iis 6 and below.
DV
That is the reason for sure. +1
Tomalak
No, I mean it's preposterous that it would disallow valid url-encoded characters.
eyelidlessness
The values in the query string are often displayed on the page, without escaping. If you allow angle brackets in the query string, and then they're displayed without escaping, you've just opened a massive XSS hole. URLScan protects your server from badly-written web apps.
Roger Lipscombe