Java小程序重置所有cookie?
我正在运行一个名为“ptviewer”的第三方 Java 小程序: http://www.fsoft.it/panorama/ptviewer.htm
它运行在使用 Codeigniter PHP 框架构建的网站。每次我访问包含该小程序的页面时,我的所有 cookie 都会从浏览器中神秘地删除。
我已将问题范围缩小到小程序。注释掉它,一切都很好。
Java 插件是否有任何已知的“功能”会导致 cookie 被删除?
问题出现在:FF(3.x)、IE8、Chrome
I'm running a third party java applet called 'ptviewer':
http://www.fsoft.it/panorama/ptviewer.htm
It's running in a site built with the Codeigniter PHP framework. Everytime I visit a page where the applet is included, all my cookies are mysteriously removed from the browser.
I have narrowed the problem down to the applet. Comment it out and everything is fine.
Is there any known 'feature' of the Java plugin which causes cookies to be removed?
Problem occurs in: FF(3.x), IE8, Chrome
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 Piskvor 向我保证这与小程序本身有关后,我打开了 ptviewer 的源代码,发现它在标头中发送了自己的用户代理。
CodeIgniter 的会话库 (1.7.2) 会进行安全检查以确保用户代理匹配。注释掉Session.php中的第185-189行可以解决这个问题。
After Piskvor assured me that it was something to do with the applet itself, I opened up the source code for ptviewer and discovered that it sends its own user-agent in the header.
CodeIgniter's session library (1.7.2) does a security check to make sure the user-agent matches. Commenting out lines 185-189 in Session.php solves this problem.
在 /application/config/config.php 中,将 sess_match_useragent 设置为 FALSE
在 Codeigniter 2.1.4 中工作正常。
非常感谢!
In /application/config/config.php, set sess_match_useragent to FALSE
Work fine in Codeigniter 2.1.4.
Thank you very much!