为什么当链接从外部来源点击饼干未确认(即的Excel,Word等) [英] Why are cookies unrecognized when a link is clicked from an external source (i.e. Excel, Word, etc...)

查看:256
本文介绍了为什么当链接从外部来源点击饼干未确认(即的Excel,Word等)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到,当一个链接从Web浏览器,如Excel或Word,我的会话cookie最初是无法识别的,即使该链接在同一个浏览器窗口的新标签中打开。

浏览器结束了最终认识到它的cookie,但我很不解,为什么从Excel或Word初始链接不起作用。为了使它更具挑战性,点击一个链接从Outlook中正常工作。

是否有人知道为什么会是这样吗?我使用Zend框架的PHP 5.3。


解决方案

这是因为MS Office的使用的HLINK.dll组件查找链路是Office文档或别的东西。 MS Office的预期打开文档中的链接,无需外部浏览器(使用IE6的的HLINK.dll组件)的帮助文档。

如果会话cookie保护网站HLINK自然被重定向到登录页面,并已达到HTML页面,并不能理解它打开它在外部浏览器。请注意,它不打开原始URL(预期的行为),但重定向的结果,即使是302重定向。

微软在不支持的组件(的HLINK.dll)的错误,而不是承认他们把它交给我们的头上(试图说服我们,这是我们使用SSO系统,即会话cookie的缺陷),并拒绝升级。它提供变通方法,关闭微软Office的查找功能

  HKEY_LOCAL_MACHINE \\ SOFTWARE \\微软\\
  办公室\\ 9.0 \\ COMMON \\网络\\ ForceShellExecute:DWORD = 1

还是为我们提供了要解决服务器端,以避免HTTP重定向和更改成JavaScript重定向或元刷新重定向(即有HLINK对原始URL获得的text / html页面,并使其运行外部浏览器来处理它)。

I noticed that when a link is clicked externally from the web browser, such as from Excel or Word, that my session cookie is initially unrecognized, even if the link opens up in a new tab of the same browser window.

The browser ends up recognizing its cookie eventually, but I am puzzled as to why that initial link from Excel or Word doesn't work. To make it even more challenging, clicking a link works fine from Outlook.

Does anybody know why this might be happening? I'm using the Zend Framework with PHP 5.3.

解决方案

This is because MS Office is using Hlink.dll component to lookup if the link is Office document or something else. MS Office expect to open the document linked within documents without the aid of external browser (using Hlink.dll component of IE6).

If session cookie protects website Hlink naturally is being redirected to login page and having reached HTML page and not able to "understand" it opens it in external browser. Note that it opens not original URL (expected behavior) but the result of redirect, even if it was 302 redirect.

Microsoft has that bug in unsupported component (Hlink.dll), instead of recognizing the bug they turn it over to our head (trying to convince us that it is flaw of SSO system we use, i.e. session cookies) and refuses to upgrade it. It offers workaround that turns off the lookup functionality of MS Office:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
  Office\9.0\Common\Internet\ForceShellExecute:DWORD=1

Or offer us to workaround serverside, to avoid HTTP redirects and change into Javascript redirects or META REFRESH redirects (i.e. to have Hlink get text/html page on original URL and make it run external browser to handle it).

这篇关于为什么当链接从外部来源点击饼干未确认(即的Excel,Word等)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆