IIS redirect mangling URL parameter value occasionally

China☆狼群 提交于 2019-12-23 01:01:42

问题


We have a multi-tenant application with a Web server in the following environment:

  • Windows 2008 R2 Datacenter
  • IIS 7.5
  • ASP.NET 4.5
  • All traffic forced into HTTPS
  • Forms authentication

We have some convenience redirects in place in the site's Web.config file. For one of the redirects, the URL parameter value is being mangled occassionally (< 1%) on the request immediately following the 301 redirect.

The rule is intended to redirect URLs such as https://www.myapp.com/some_client_id/notifications to https://www.myapp.com/lms/profile/notifications.aspx?cid=some_client_id

Here is its definition:

<rule name="Redirect profile notifications page" stopProcessing="true">
    <match url="^([^/]+)/notifications/?$" />
    <conditions>
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    </conditions>
    <action type="Redirect" url="lms/profile/notifications.aspx?cid={R:1}" />
</rule>

Looking at the WWW logs, I see something along the lines of:

2014-07-03 09:40:19 W3SVC2 a.b.c.d GET /some_client_id/notifications - 443 - w.x.y.z Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) - - www.myapp.com 301 0 0 581 297 156
2014-07-03 09:40:19 W3SVC2 a.b.c.d GET /lms/profile/notifications.aspx cid=mang_ledch_rs 443 - w.x.y.z Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) - - www.myapp.com 302 0 0 693 277 109
2014-07-03 09:40:19 W3SVC2 a.b.c.d GET /lms/login.aspx ReturnUrl=%2flms%2fprofile%2fnotifications.aspx%3fcid%3dmang_ledch_rs&cid=mang_ledch_rs 443 - w.x.y.z Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) - - www.myapp.com 200 0 0 7173 336 218

When the client ID value is mangled, it:

  • happens across a number of clients but predominantly at the same ones
  • mangles to the same characters (for example, 'j' is mangled to 'w', 'l' is mangled to 'y')

I'm not able to reproduce the issue but it happens a few times a day. Using Fiddler, I don't see anything out of the ordinary when making similar requests.

Any ideas on what is causing this? If not, do you have suggestions for how to debug this? Thanks.


回答1:


I am confident that this issue is the result of email link-checking software that is using ROT13 encryption on link parameter values to avoid performing actions, such as unsubscribing.



来源:https://stackoverflow.com/questions/27673731/iis-redirect-mangling-url-parameter-value-occasionally

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!