P3P Policy not working to allow 3rd party cookies in IE

青春壹個敷衍的年華 提交于 2019-12-09 05:54:56

问题


Thanks in advance for helping a first-time poster. I've been banging my head on the wall all day...

I have a site that must be able to function and set cookies while running inside a frame. In IE, with default security settings, this is a problem, because a framed site's cookies are treated as third party. Now, I've read all the info on P3P, and I've created a compact privacy policy, served via HTTP header, an XML policy file, and an XML reference file. I have checked, and the header is being sent properly, and IE can read the policy file.

However, it is STILL blocking cookies from the site. I've created a stripped-down example here: http://www.hankshelper.com/privtest.php Note that cookies in the framed site are being blocked by IE (6, 7, and 8).

If anyone could check out my compact policy

Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR NID DEVi OUR BUS INT\""

and/or XML policy http://www.searchtempest.com/w3c/searchtempest.xml

and let me know wtf, I would be eternally grateful. I've stripped them down as much as possible, and I just can't see anything that IE would have a problem with. (And of course IE itself is wonderfully verbose as far as exactly WHY it's blocking cookies...) I'm happy to provide any additional information you need.


回答1:


The policy checker at http://www.webentrust.com/p3p.html says Error: No P3P Policy Found

You are saying, in the p3p header, this:

P3P: policyref="/w3c/p3p.xml", CP="IDC DSP COR NID DEVi OUR BUS INT"

meaning "I have this compact policy (CP), and also this full policy: /w3c/p3p.xml". BUT, http://www.hankshelper.com/w3c/p3p.xml (referenced above) gives a 404 Not Found error. You have to create your p3p policy - e.g. using the IBM P3P Editor and upload it to the path you specified.




回答2:


I'm not certain what part of our original compact policy was being rejected, but I was finally able to solve this problem with the help of couple other resources.

From here: http://www.marco.org/2007/04/27/p3p-sucks-how-to-get-frame-cookies-unblocked-in-ie6

This is approximately the minimum HTTP header needed, and it basically says “We’re not collecting any of your personal data”:

P3P: CP=”NID DSP ALL COR”

If you actually store some data, such as email addresses and login cookies, this (also working) policy may be more correct:

P3P: CP=”ALL ADM DEV PSAi COM OUR OTRo STP IND ONL”

The policy we ended up using was

ALL ADM DEV PSAo COM OUR OTRo IND ONL

Descriptions of all the compact policy parameters can be found here: http://www.p3pwriter.com/LRN_111.asp



来源:https://stackoverflow.com/questions/1707176/p3p-policy-not-working-to-allow-3rd-party-cookies-in-ie

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