Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

requestFiltering allowDoubleEscaping="True" for a single page?

I have a web application that I've inherited that has double encoded URLS. If it where possible I'd simply fix the instances where the URLs are being double encoded, but this is not possible. I am able to process the URLs if I use:

<requestFiltering allowDoubleEscaping="True" />

Is it possible to apply this to only a single page?

like image 990
RandomWebGuy Avatar asked Feb 17 '11 15:02

RandomWebGuy


People also ask

How do I enable double escaping in IIS?

in the IIS webserver section, double click the 'Request Filtering' icon. in the 'File Name Extension' right click->Edit Feature Settings...' the file 'web. config' check the option 'Allow double escaping' (this option is unchecked by defualt)

How do I whitelist a URL in IIS?

In the Home pane, double-click Request Filtering. In the Request Filtering pane, click the URL tab, then click Allow URL... in the Actions pane. In the Allow URL dialog box, enter the URL that you wish to allow, and then click OK.


1 Answers

Yes, it should be possible, you can add that in a <location path='file'> tag inside the web.config of your application.

Example:

<location path="CustomHttpHandler">
  <system.webServer>
    <security>
      <requestFiltering allowDoubleEscaping="true" />
    </security>
  </system.webServer>
</location>

Or if you want to use the UI (IIS Manager), you can drill-down in the Tree all the way to the folder where the file is contained, then click the "Content View" and right-click the file and choose "Switch to Features View" at that point you will see the file in the Tree. Now you can set any IIS setting and it will only apply to that File, so go to the Request Filtering icon and set the value.

like image 118
Carlos Aguilar Mares Avatar answered Nov 09 '22 02:11

Carlos Aguilar Mares