{"action":"created","comment":{"url":"https://api.github.com/repos/openfun/fun-apps/pulls/comments/45869372","id":45869372,"diff_hunk":"@@ -44,6 +44,12 @@\n     <style>\n     </style>\n \n+    <script>\n+        function addCsrfToken() {\n+            console.log(\"pweep\");\n+        }\n+    </script>","path":"funsite/templates/funsite/parts/base.html","position":8,"original_position":8,"commit_id":"c8ff1e73d99717ed2a6034e8f9ed0d308997ea0d","original_commit_id":"c8ff1e73d99717ed2a6034e8f9ed0d308997ea0d","user":{"login":"rmoch","id":89626,"avatar_url":"https://avatars.githubusercontent.com/u/89626?v=3","gravatar_id":"","url":"https://api.github.com/users/rmoch","html_url":"https://github.com/rmoch","followers_url":"https://api.github.com/users/rmoch/followers","following_url":"https://api.github.com/users/rmoch/following{/other_user}","gists_url":"https://api.github.com/users/rmoch/gists{/gist_id}","starred_url":"https://api.github.com/users/rmoch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmoch/subscriptions","organizations_url":"https://api.github.com/users/rmoch/orgs","repos_url":"https://api.github.com/users/rmoch/repos","events_url":"https://api.github.com/users/rmoch/events{/privacy}","received_events_url":"https://api.github.com/users/rmoch/received_events","type":"User","site_admin":false},"body":"j'aurais mis pouac","created_at":"2015-11-25T14:04:15Z","updated_at":"2015-11-25T14:04:15Z","html_url":"https://github.com/openfun/fun-apps/pull/333#discussion_r45869372","pull_request_url":"https://api.github.com/repos/openfun/fun-apps/pulls/333","_links":{"self":{"href":"https://api.github.com/repos/openfun/fun-apps/pulls/comments/45869372"},"html":{"href":"https://github.com/openfun/fun-apps/pull/333#discussion_r45869372"},"pull_request":{"href":"https://api.github.com/repos/openfun/fun-apps/pulls/333"}}},"pull_request":{"url":"https://api.github.com/repos/openfun/fun-apps/pulls/333","id":51790902,"html_url":"https://github.com/openfun/fun-apps/pull/333","diff_url":"https://github.com/openfun/fun-apps/pull/333.diff","patch_url":"https://github.com/openfun/fun-apps/pull/333.patch","issue_url":"https://api.github.com/repos/openfun/fun-apps/issues/333","number":333,"state":"open","locked":false,"title":"Regisb/modal login csrf","user":{"login":"regisb","id":44319,"avatar_url":"https://avatars.githubusercontent.com/u/44319?v=3","gravatar_id":"","url":"https://api.github.com/users/regisb","html_url":"https://github.com/regisb","followers_url":"https://api.github.com/users/regisb/followers","following_url":"https://api.github.com/users/regisb/following{/other_user}","gists_url":"https://api.github.com/users/regisb/gists{/gist_id}","starred_url":"https://api.github.com/users/regisb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/regisb/subscriptions","organizations_url":"https://api.github.com/users/regisb/orgs","repos_url":"https://api.github.com/users/regisb/repos","events_url":"https://api.github.com/users/regisb/events{/privacy}","received_events_url":"https://api.github.com/users/regisb/received_events","type":"User","site_admin":false},"body":"The modal login was broken because POST requests did not include\r\nmatching csrfmiddlewaretoken parameter and csrftoken cookie value. This\r\nwas because some pages (including the landing page) were cached in\r\nanonymous mode.\r\n\r\nThe problem can be reproduced locally by the following steps:\r\n1) Enable the edx cache in common/djangoapps/util/cache.py\r\n2) Load the landing page in log-out mode\r\n3) Modify the csrftoken cookie value\r\n4) Reload the landing page quickly (before 3 minutes): the\r\ncsrfmiddlewaretoken hidden field will have the former value.\r\n\r\nWe fix this problem by reading the csrftoken cookie at\r\nruntime in javascript.\r\n\r\nThis closes issue #2173.","created_at":"2015-11-25T12:58:05Z","updated_at":"2015-11-25T14:04:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2158f0c2d5123208a04eddfa77e3f652d73a67a2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openfun/fun-apps/pulls/333/commits","review_comments_url":"https://api.github.com/repos/openfun/fun-apps/pulls/333/comments","review_comment_url":"https://api.github.com/repos/openfun/fun-apps/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openfun/fun-apps/issues/333/comments","statuses_url":"https://api.github.com/repos/openfun/fun-apps/statuses/c8ff1e73d99717ed2a6034e8f9ed0d308997ea0d","head":{"label":"openfun:regisb/modal-login-csrf","ref":"regisb/modal-login-csrf","sha":"c8ff1e73d99717ed2a6034e8f9ed0d308997ea0d","user":{"login":"openfun","id":7224891,"avatar_url":"https://avatars.githubusercontent.com/u/7224891?v=3","gravatar_id":"","url":"https://api.github.com/users/openfun","html_url":"https://github.com/openfun","followers_url":"https://api.github.com/users/openfun/followers","following_url":"https://api.github.com/users/openfun/following{/other_user}","gists_url":"https://api.github.com/users/openfun/gists{/gist_id}","starred_url":"https://api.github.com/users/openfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfun/subscriptions","organizations_url":"https://api.github.com/users/openfun/orgs","repos_url":"https://api.github.com/users/openfun/repos","events_url":"https://api.github.com/users/openfun/events{/privacy}","received_events_url":"https://api.github.com/users/openfun/received_events","type":"Organization","site_admin":false},"repo":{"id":20556967,"name":"fun-apps","full_name":"openfun/fun-apps","owner":{"login":"openfun","id":7224891,"avatar_url":"https://avatars.githubusercontent.com/u/7224891?v=3","gravatar_id":"","url":"https://api.github.com/users/openfun","html_url":"https://github.com/openfun","followers_url":"https://api.github.com/users/openfun/followers","following_url":"https://api.github.com/users/openfun/following{/other_user}","gists_url":"https://api.github.com/users/openfun/gists{/gist_id}","starred_url":"https://api.github.com/users/openfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfun/subscriptions","organizations_url":"https://api.github.com/users/openfun/orgs","repos_url":"https://api.github.com/users/openfun/repos","events_url":"https://api.github.com/users/openfun/events{/privacy}","received_events_url":"https://api.github.com/users/openfun/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openfun/fun-apps","description":"The main code repository for FUN MOOC","fork":false,"url":"https://api.github.com/repos/openfun/fun-apps","forks_url":"https://api.github.com/repos/openfun/fun-apps/forks","keys_url":"https://api.github.com/repos/openfun/fun-apps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openfun/fun-apps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openfun/fun-apps/teams","hooks_url":"https://api.github.com/repos/openfun/fun-apps/hooks","issue_events_url":"https://api.github.com/repos/openfun/fun-apps/issues/events{/number}","events_url":"https://api.github.com/repos/openfun/fun-apps/events","assignees_url":"https://api.github.com/repos/openfun/fun-apps/assignees{/user}","branches_url":"https://api.github.com/repos/openfun/fun-apps/branches{/branch}","tags_url":"https://api.github.com/repos/openfun/fun-apps/tags","blobs_url":"https://api.github.com/repos/openfun/fun-apps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openfun/fun-apps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openfun/fun-apps/git/refs{/sha}","trees_url":"https://api.github.com/repos/openfun/fun-apps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openfun/fun-apps/statuses/{sha}","languages_url":"https://api.github.com/repos/openfun/fun-apps/languages","stargazers_url":"https://api.github.com/repos/openfun/fun-apps/stargazers","contributors_url":"https://api.github.com/repos/openfun/fun-apps/contributors","subscribers_url":"https://api.github.com/repos/openfun/fun-apps/subscribers","subscription_url":"https://api.github.com/repos/openfun/fun-apps/subscription","commits_url":"https://api.github.com/repos/openfun/fun-apps/commits{/sha}","git_commits_url":"https://api.github.com/repos/openfun/fun-apps/git/commits{/sha}","comments_url":"https://api.github.com/repos/openfun/fun-apps/comments{/number}","issue_comment_url":"https://api.github.com/repos/openfun/fun-apps/issues/comments{/number}","contents_url":"https://api.github.com/repos/openfun/fun-apps/contents/{+path}","compare_url":"https://api.github.com/repos/openfun/fun-apps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openfun/fun-apps/merges","archive_url":"https://api.github.com/repos/openfun/fun-apps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openfun/fun-apps/downloads","issues_url":"https://api.github.com/repos/openfun/fun-apps/issues{/number}","pulls_url":"https://api.github.com/repos/openfun/fun-apps/pulls{/number}","milestones_url":"https://api.github.com/repos/openfun/fun-apps/milestones{/number}","notifications_url":"https://api.github.com/repos/openfun/fun-apps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openfun/fun-apps/labels{/name}","releases_url":"https://api.github.com/repos/openfun/fun-apps/releases{/id}","created_at":"2014-06-06T08:42:58Z","updated_at":"2015-11-24T10:24:57Z","pushed_at":"2015-11-25T12:58:06Z","git_url":"git://github.com/openfun/fun-apps.git","ssh_url":"git@github.com:openfun/fun-apps.git","clone_url":"https://github.com/openfun/fun-apps.git","svn_url":"https://github.com/openfun/fun-apps","homepage":"https://www.france-universite-numerique-mooc.fr/","size":25165,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":6,"forks":7,"open_issues":6,"watchers":1,"default_branch":"dev"}},"base":{"label":"openfun:dev","ref":"dev","sha":"d6fc8fd3041be277f1d5a92f0a327fead6fbe7a5","user":{"login":"openfun","id":7224891,"avatar_url":"https://avatars.githubusercontent.com/u/7224891?v=3","gravatar_id":"","url":"https://api.github.com/users/openfun","html_url":"https://github.com/openfun","followers_url":"https://api.github.com/users/openfun/followers","following_url":"https://api.github.com/users/openfun/following{/other_user}","gists_url":"https://api.github.com/users/openfun/gists{/gist_id}","starred_url":"https://api.github.com/users/openfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfun/subscriptions","organizations_url":"https://api.github.com/users/openfun/orgs","repos_url":"https://api.github.com/users/openfun/repos","events_url":"https://api.github.com/users/openfun/events{/privacy}","received_events_url":"https://api.github.com/users/openfun/received_events","type":"Organization","site_admin":false},"repo":{"id":20556967,"name":"fun-apps","full_name":"openfun/fun-apps","owner":{"login":"openfun","id":7224891,"avatar_url":"https://avatars.githubusercontent.com/u/7224891?v=3","gravatar_id":"","url":"https://api.github.com/users/openfun","html_url":"https://github.com/openfun","followers_url":"https://api.github.com/users/openfun/followers","following_url":"https://api.github.com/users/openfun/following{/other_user}","gists_url":"https://api.github.com/users/openfun/gists{/gist_id}","starred_url":"https://api.github.com/users/openfun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfun/subscriptions","organizations_url":"https://api.github.com/users/openfun/orgs","repos_url":"https://api.github.com/users/openfun/repos","events_url":"https://api.github.com/users/openfun/events{/privacy}","received_events_url":"https://api.github.com/users/openfun/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openfun/fun-apps","description":"The main code repository for FUN MOOC","fork":false,"url":"https://api.github.com/repos/openfun/fun-apps","forks_url":"https://api.github.com/repos/openfun/fun-apps/forks","keys_url":"https://api.github.com/repos/openfun/fun-apps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openfun/fun-apps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openfun/fun-apps/teams","hooks_url":"https://api.github.com/repos/openfun/fun-apps/hooks","issue_events_url":"https://api.github.com/repos/openfun/fun-apps/issues/events{/number}","events_url":"https://api.github.com/repos/openfun/fun-apps/events","assignees_url":"https://api.github.com/repos/openfun/fun-apps/assignees{/user}","branches_url":"https://api.github.com/repos/openfun/fun-apps/branches{/branch}","tags_url":"https://api.github.com/repos/openfun/fun-apps/tags","blobs_url":"https://api.github.com/repos/openfun/fun-apps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openfun/fun-apps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openfun/fun-apps/git/refs{/sha}","trees_url":"https://api.github.com/repos/openfun/fun-apps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openfun/fun-apps/statuses/{sha}","languages_url":"https://api.github.com/repos/openfun/fun-apps/languages","stargazers_url":"https://api.github.com/repos/openfun/fun-apps/stargazers","contributors_url":"https://api.github.com/repos/openfun/fun-apps/contributors","subscribers_url":"https://api.github.com/repos/openfun/fun-apps/subscribers","subscription_url":"https://api.github.com/repos/openfun/fun-apps/subscription","commits_url":"https://api.github.com/repos/openfun/fun-apps/commits{/sha}","git_commits_url":"https://api.github.com/repos/openfun/fun-apps/git/commits{/sha}","comments_url":"https://api.github.com/repos/openfun/fun-apps/comments{/number}","issue_comment_url":"https://api.github.com/repos/openfun/fun-apps/issues/comments{/number}","contents_url":"https://api.github.com/repos/openfun/fun-apps/contents/{+path}","compare_url":"https://api.github.com/repos/openfun/fun-apps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openfun/fun-apps/merges","archive_url":"https://api.github.com/repos/openfun/fun-apps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openfun/fun-apps/downloads","issues_url":"https://api.github.com/repos/openfun/fun-apps/issues{/number}","pulls_url":"https://api.github.com/repos/openfun/fun-apps/pulls{/number}","milestones_url":"https://api.github.com/repos/openfun/fun-apps/milestones{/number}","notifications_url":"https://api.github.com/repos/openfun/fun-apps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openfun/fun-apps/labels{/name}","releases_url":"https://api.github.com/repos/openfun/fun-apps/releases{/id}","created_at":"2014-06-06T08:42:58Z","updated_at":"2015-11-24T10:24:57Z","pushed_at":"2015-11-25T12:58:06Z","git_url":"git://github.com/openfun/fun-apps.git","ssh_url":"git@github.com:openfun/fun-apps.git","clone_url":"https://github.com/openfun/fun-apps.git","svn_url":"https://github.com/openfun/fun-apps","homepage":"https://www.france-universite-numerique-mooc.fr/","size":25165,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":6,"forks":7,"open_issues":6,"watchers":1,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/openfun/fun-apps/pulls/333"},"html":{"href":"https://github.com/openfun/fun-apps/pull/333"},"issue":{"href":"https://api.github.com/repos/openfun/fun-apps/issues/333"},"comments":{"href":"https://api.github.com/repos/openfun/fun-apps/issues/333/comments"},"review_comments":{"href":"https://api.github.com/repos/openfun/fun-apps/pulls/333/comments"},"review_comment":{"href":"https://api.github.com/repos/openfun/fun-apps/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openfun/fun-apps/pulls/333/commits"},"statuses":{"href":"https://api.github.com/repos/openfun/fun-apps/statuses/c8ff1e73d99717ed2a6034e8f9ed0d308997ea0d"}}}}