Waffle 和 IE 导致后期参数丢失
为了调试,我编写了一个非常简单的 Web 应用程序,其中仅包含一个简单的 JSP 页面和一个包含文本字段和提交按钮的小表单。
tomcat 配置为使用此页面上的 Waffle Filter。我知道将表单发送到同一页面,但位于过滤器未覆盖的另一个 URL 下。现在,Post 参数完全丢失,但会传输 ntml 令牌。
因此,总结一下:
- 我转到 http://myserver/autologin/test.jsp (它通过 waffle过滤器)
- 在该页面上,我有一个表单,其中的操作指向(http://myserver/content/test.jsp),这是同一页面,但在另一个 URL(别名)下引用。
- 所有 POST 参数都在第二个请求中丢失,
我使用的是 waffle.codeplex.com 和 IE8 中的 Waffle。
编辑:如果我使用其他 NTLM 过滤器,也会发生这种情况。因此,问题不是这里的 Waffle,而是 Internet Explorer,它在每次发出 POST 请求时强制重新验证 NTLM 会话。
以前有人遇到过这个问题吗?
For debugging i wrote a really simple Web-Application which contains only a simple JSP Page with a small Form containing a textfield and a submit button.
The tomcat is configured to use the Waffle Filter on this page. I know send the Form to the same page but under another URL which is not covered by the Filter. The Post Parameters are now completely lost but an ntml token gets transmitted.
So to summerize:
- I go to http://myserver/autologin/test.jsp (which goes through waffle filter)
- On that page i have a form with an action pointing to (http://myserver/content/test.jsp) which is the same page but refered to under another URL (alias).
- All POST Parameters are lost in that second request
I'm using Waffle from waffle.codeplex.com and IE8.
EDIT: This is also happening if i am using other NTLM filters. So the problem is not Waffle here but Internet Explorer which forces to reauthenticate the NTLM session everytime a POST request is issued.
Did anyone experience this problem before?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我在 IE8 和 Windows7 上遇到同样的问题
以下解决方案仅适用于 WindowsXP 上的 IE7:
http://billcomer.blogspot.com/2009/01/ntlm-authentication-and-ie-post-problem.html
编辑:
好的,我忘记将我的服务器添加到我的本地 Itranet 区域:
IE->互联网选项 ->安全->选择“区域设置 Intranet”并单击“站点”->“站点”高级->现在添加您的服务器
http: //www.nateirwin.net/2007/01/19/enabling-ntlm-authentication-in-firefox-and-internet-explorer/
现在可以了Windows7 上也可使用 IE8
I have the same Problem with IE8 and Windows7
The following solution only worked for me with IE7 on WindowsXP:
http://billcomer.blogspot.com/2009/01/ntlm-authentication-and-ie-post-problem.html
EDIT:
Ok, i forgot to add my server to my local Itranet zone:
IE -> Internet Options -> Security -> Select "Locale Intranet" and click on Sites -> Advanced -> Now add your Server
http://www.nateirwin.net/2007/01/19/enabling-ntlm-authentication-in-firefox-and-internet-explorer/
Now it works also with IE8 on Windows7
在我的示例中,网址 http://myserver/autologin/test.jsp 通过过滤器发送,因此华夫饼已正确验证并登陆页面。当我发布表单时,新请求没有通过 waffle,导致 IE 强制通过 NTLM 重新进行身份验证。由于Waffle不再参与通信,导致重新认证失败,post参数丢失。
因此,快速解决方案是更改 waffle 的 url 模式,以便它匹配应用程序中的所有站点。即 /* 而不是 /autologin。
In my example, The url http://myserver/autologin/test.jsp was send through the filter, so waffle authenticated correctly and landed on the page. When i then posted the form, the new request did not go through waffle, causing the IE to force a re-authentication via NTLM. Due to the fact that Waffle was no longer involved in the communication, the re-authentication failed and the post parameters were lost.
So the quick solution is to change the url pattern for waffle, so that it matches all sites within the application. i.e. /* instead of /autologin.