Skip to content

Commit

Permalink
remove some code that I have no clue why is needed and causes problems
Browse files Browse the repository at this point in the history
  • Loading branch information
tswicegood authored and jezdez committed Mar 3, 2010
1 parent 7ba3654 commit 4e756ff
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions facebook/djangofb/__init__.py
Expand Up @@ -228,21 +228,4 @@ def process_response(self, request, response):
except:
return response

if not fb.is_session_from_cookie:
# Make sure the browser accepts our session cookies inside an Iframe
response['P3P'] = 'CP="NOI DSP COR NID ADMa OPTa OUR NOR"'
fb_cookies = {
'expires': fb.session_key_expires,
'session_key': fb.session_key,
'user': fb.uid,
}

expire_time = None
if fb.session_key_expires:
expire_time = datetime.utcfromtimestamp(fb.session_key_expires)

for k in fb_cookies:
response.set_cookie(self.api_key + '_' + k, fb_cookies[k], expires=expire_time)
response.set_cookie(self.api_key , fb._hash_args(fb_cookies), expires=expire_time)

return response

1 comment on commit 4e756ff

@tubaman
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so I think I know what this stuff is for. I believe it's due to IE8 and Safari 4.0's higher default security. They require the P3P stuff for iframe facebook apps. I've reverted this change in my own repo because now I'm doing an iframe app and I need Safari and IE8 to work.

Please sign in to comment.