{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/comments/54488275","id":54488275,"diff_hunk":"@@ -91,7 +91,13 @@ def lti_launch(request, course_id, usage_id):\n     # used earlier to verify the oauth signature.\n     store_outcome_parameters(params, request.user, lti_consumer)\n \n-    return render_courseware(request, params['usage_key'])\n+    resp = render_courseware(request, params['usage_key'])\n+\n+    # this header should be used to save CSRF cookies in IE 10+ browser\n+    # in case of display courseware through the iframe\n+    # http://blogs.msdn.com/b/ieinternals/archive/2013/09/17/simple-introduction-to-p3p-cookie-blocking-frame.aspx\n+    resp['P3P'] = 'CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"'","path":"lms/djangoapps/lti_provider/views.py","position":10,"original_position":10,"commit_id":"c04ff3871ead75507428e5a69eadb9bf4d4c0a42","original_commit_id":"c04ff3871ead75507428e5a69eadb9bf4d4c0a42","user":{"login":"douglashall","id":224634,"avatar_url":"https://avatars.githubusercontent.com/u/224634?v=3","gravatar_id":"","url":"https://api.github.com/users/douglashall","html_url":"https://github.com/douglashall","followers_url":"https://api.github.com/users/douglashall/followers","following_url":"https://api.github.com/users/douglashall/following{/other_user}","gists_url":"https://api.github.com/users/douglashall/gists{/gist_id}","starred_url":"https://api.github.com/users/douglashall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/douglashall/subscriptions","organizations_url":"https://api.github.com/users/douglashall/orgs","repos_url":"https://api.github.com/users/douglashall/repos","events_url":"https://api.github.com/users/douglashall/events{/privacy}","received_events_url":"https://api.github.com/users/douglashall/received_events","type":"User","site_admin":false},"body":"@StraNNiKK How did you come to define this P3P policy?","created_at":"2016-02-29T22:15:07Z","updated_at":"2016-02-29T22:15:07Z","html_url":"https://github.com/edx/edx-platform/pull/11607#discussion_r54488275","pull_request_url":"https://api.github.com/repos/edx/edx-platform/pulls/11607","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments/54488275"},"html":{"href":"https://github.com/edx/edx-platform/pull/11607#discussion_r54488275"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/11607"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/11607","id":60009921,"html_url":"https://github.com/edx/edx-platform/pull/11607","diff_url":"https://github.com/edx/edx-platform/pull/11607.diff","patch_url":"https://github.com/edx/edx-platform/pull/11607.patch","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/11607","number":11607,"state":"open","locked":false,"title":"Invalid display courseware through the LTI iframe in IE 10+","user":{"login":"StraNNiKK","id":1876893,"avatar_url":"https://avatars.githubusercontent.com/u/1876893?v=3","gravatar_id":"","url":"https://api.github.com/users/StraNNiKK","html_url":"https://github.com/StraNNiKK","followers_url":"https://api.github.com/users/StraNNiKK/followers","following_url":"https://api.github.com/users/StraNNiKK/following{/other_user}","gists_url":"https://api.github.com/users/StraNNiKK/gists{/gist_id}","starred_url":"https://api.github.com/users/StraNNiKK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StraNNiKK/subscriptions","organizations_url":"https://api.github.com/users/StraNNiKK/orgs","repos_url":"https://api.github.com/users/StraNNiKK/repos","events_url":"https://api.github.com/users/StraNNiKK/events{/privacy}","received_events_url":"https://api.github.com/users/StraNNiKK/received_events","type":"User","site_admin":false},"body":"When using in-frame LTI navigation in IE 10 & 11, problems are not rendering properly. The problems render properly in IE 10 & 11 when using edX directly, or when opening LTI in a new tab. This is reproducible in Canvas and D2L:\r\n![ie_bug1](https://cloud.githubusercontent.com/assets/1876893/13189079/5e6d9132-d766-11e5-8f0f-e29e8feb2f86.jpeg)\r\nThis problem happens because in iframe JS couldn't get Cookie for the CSRF protection and sends always `null`:\r\n![ie_bug2](https://cloud.githubusercontent.com/assets/1876893/13189156/c5ed21b0-d766-11e5-9cce-2ce926f7f2ca.jpeg)\r\nSo per every such question LTI server returns HTTP 403:\r\n```\r\n\"POST /courses/course-v1:OrgX+CS101+qwerty1/xblock/block-v1:OrgX+CS101+qwerty1+type@problem+block@5932e9abc0224b04af13c048a174553f/handler/xmodule_handler/problem_get HTTP/1.0\" 200 3847\r\n```\r\ninstead of:\r\n```\r\n\"POST /courses/course-v1:OrgX+CS101+qwerty1/xblock/block-v1:OrgX+CS101+qwerty1+type@problem+block@5932e9abc0224b04af13c048a174553f/handler/xmodule_handler/problem_get HTTP/1.0\" 403 9976\r\n```\r\nIt is connected with the cookie-restricting privacy feature called P3P. More details can be found here: http://blogs.msdn.com/b/ieinternals/archive/2013/09/17/simple-introduction-to-p3p-cookie-blocking-frame.aspx\r\nI'v created a little fix. You could see it in this pull request. I know only one case of using iframe to display courseware so I'm not sure that this fix should be applied only for the LTI views. May be it should be used globally for all other entry points.\r\nDisplay questions after the fix:\r\n![ie_bug3](https://cloud.githubusercontent.com/assets/1876893/13189434/72f65b28-d768-11e5-8e20-d94340f6812b.jpeg)","created_at":"2016-02-19T21:28:00Z","updated_at":"2016-02-29T22:15:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"30f11bae948a6e1172a666b2aed1fd16b2e7ba75","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-platform/pulls/11607/commits","review_comments_url":"https://api.github.com/repos/edx/edx-platform/pulls/11607/comments","review_comment_url":"https://api.github.com/repos/edx/edx-platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/edx-platform/issues/11607/comments","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/c04ff3871ead75507428e5a69eadb9bf4d4c0a42","head":{"label":"CredoReference:invalid-display-courseware-through-lti-iframe","ref":"invalid-display-courseware-through-lti-iframe","sha":"c04ff3871ead75507428e5a69eadb9bf4d4c0a42","user":{"login":"CredoReference","id":15221069,"avatar_url":"https://avatars.githubusercontent.com/u/15221069?v=3","gravatar_id":"","url":"https://api.github.com/users/CredoReference","html_url":"https://github.com/CredoReference","followers_url":"https://api.github.com/users/CredoReference/followers","following_url":"https://api.github.com/users/CredoReference/following{/other_user}","gists_url":"https://api.github.com/users/CredoReference/gists{/gist_id}","starred_url":"https://api.github.com/users/CredoReference/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CredoReference/subscriptions","organizations_url":"https://api.github.com/users/CredoReference/orgs","repos_url":"https://api.github.com/users/CredoReference/repos","events_url":"https://api.github.com/users/CredoReference/events{/privacy}","received_events_url":"https://api.github.com/users/CredoReference/received_events","type":"Organization","site_admin":false},"repo":{"id":44635152,"name":"edx-platform","full_name":"CredoReference/edx-platform","owner":{"login":"CredoReference","id":15221069,"avatar_url":"https://avatars.githubusercontent.com/u/15221069?v=3","gravatar_id":"","url":"https://api.github.com/users/CredoReference","html_url":"https://github.com/CredoReference","followers_url":"https://api.github.com/users/CredoReference/followers","following_url":"https://api.github.com/users/CredoReference/following{/other_user}","gists_url":"https://api.github.com/users/CredoReference/gists{/gist_id}","starred_url":"https://api.github.com/users/CredoReference/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CredoReference/subscriptions","organizations_url":"https://api.github.com/users/CredoReference/orgs","repos_url":"https://api.github.com/users/CredoReference/repos","events_url":"https://api.github.com/users/CredoReference/events{/privacy}","received_events_url":"https://api.github.com/users/CredoReference/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CredoReference/edx-platform","description":"The Open edX platform, the software that powers edX!","fork":true,"url":"https://api.github.com/repos/CredoReference/edx-platform","forks_url":"https://api.github.com/repos/CredoReference/edx-platform/forks","keys_url":"https://api.github.com/repos/CredoReference/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CredoReference/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CredoReference/edx-platform/teams","hooks_url":"https://api.github.com/repos/CredoReference/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/CredoReference/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/CredoReference/edx-platform/events","assignees_url":"https://api.github.com/repos/CredoReference/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/CredoReference/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/CredoReference/edx-platform/tags","blobs_url":"https://api.github.com/repos/CredoReference/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CredoReference/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CredoReference/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/CredoReference/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CredoReference/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/CredoReference/edx-platform/languages","stargazers_url":"https://api.github.com/repos/CredoReference/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/CredoReference/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/CredoReference/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/CredoReference/edx-platform/subscription","commits_url":"https://api.github.com/repos/CredoReference/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/CredoReference/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/CredoReference/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/CredoReference/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/CredoReference/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/CredoReference/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CredoReference/edx-platform/merges","archive_url":"https://api.github.com/repos/CredoReference/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CredoReference/edx-platform/downloads","issues_url":"https://api.github.com/repos/CredoReference/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/CredoReference/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/CredoReference/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/CredoReference/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CredoReference/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/CredoReference/edx-platform/releases{/id}","deployments_url":"https://api.github.com/repos/CredoReference/edx-platform/deployments","created_at":"2015-10-20T21:10:15Z","updated_at":"2016-01-25T19:54:03Z","pushed_at":"2016-02-29T16:13:28Z","git_url":"git://github.com/CredoReference/edx-platform.git","ssh_url":"git@github.com:CredoReference/edx-platform.git","clone_url":"https://github.com/CredoReference/edx-platform.git","svn_url":"https://github.com/CredoReference/edx-platform","homepage":"http://open.edx.org/","size":602470,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"41febaa87559ce7467628d131648f0c596a05439","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":10391073,"name":"edx-platform","full_name":"edx/edx-platform","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-platform","description":"The Open edX platform, the software that powers edX!","fork":false,"url":"https://api.github.com/repos/edx/edx-platform","forks_url":"https://api.github.com/repos/edx/edx-platform/forks","keys_url":"https://api.github.com/repos/edx/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-platform/teams","hooks_url":"https://api.github.com/repos/edx/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-platform/events","assignees_url":"https://api.github.com/repos/edx/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-platform/tags","blobs_url":"https://api.github.com/repos/edx/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-platform/languages","stargazers_url":"https://api.github.com/repos/edx/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-platform/subscription","commits_url":"https://api.github.com/repos/edx/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-platform/merges","archive_url":"https://api.github.com/repos/edx/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-platform/downloads","issues_url":"https://api.github.com/repos/edx/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-platform/releases{/id}","deployments_url":"https://api.github.com/repos/edx/edx-platform/deployments","created_at":"2013-05-30T20:20:38Z","updated_at":"2016-02-29T15:49:24Z","pushed_at":"2016-02-29T22:14:26Z","git_url":"git://github.com/edx/edx-platform.git","ssh_url":"git@github.com:edx/edx-platform.git","clone_url":"https://github.com/edx/edx-platform.git","svn_url":"https://github.com/edx/edx-platform","homepage":"http://open.edx.org/","size":691141,"stargazers_count":2423,"watchers_count":2423,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1473,"mirror_url":null,"open_issues_count":162,"forks":1473,"open_issues":162,"watchers":2423,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/11607"},"html":{"href":"https://github.com/edx/edx-platform/pull/11607"},"issue":{"href":"https://api.github.com/repos/edx/edx-platform/issues/11607"},"comments":{"href":"https://api.github.com/repos/edx/edx-platform/issues/11607/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/11607/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/11607/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-platform/statuses/c04ff3871ead75507428e5a69eadb9bf4d4c0a42"}}}}