RequestFiltering allowDoubleEscaping = "True" for one page?

I have a web application that I inherited that has double coded URLs. If possible, I would simply fix instances where the URLs are double-encoded, but that is not possible. I can handle URLs if I use:

<requestFiltering allowDoubleEscaping="True" /> 

Can this be applied to only one page?

+4
source share
1 answer

Yes, it should be possible, you can add this to the <location path = 'file'> path inside your application's web.config.

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 expand in the tree completely to the folder where the file is located, then click on “View Content” and right-click on the file and select “Switch to Function View”, at that moment you will see the file in the tree. Now you can set any IIS parameter and it will apply only to this file, so go to the ticket filtering icon and set the value.

+9
source

Source: https://habr.com/ru/post/1340188/


All Articles