{"action":"created","comment":{"url":"https://api.github.com/repos/maxcountryman/flask-login/pulls/comments/23967720","id":23967720,"diff_hunk":"@@ -385,16 +385,10 @@ def _session_protection(self):\n         app = current_app._get_current_object()\n         mode = app.config.get('SESSION_PROTECTION', self.session_protection)\n \n-        # if there is no '_id', then take the current one for good\n-        if '_id' not in sess:\n-            sess['_id'] = ident\n+        # if the sess is empty, it's an anonymous user or just logged out","path":"flask_login.py","position":7,"original_position":7,"commit_id":"9c8f3ca7441fa0abb506093c7161b5aa4cad88df","original_commit_id":"9c8f3ca7441fa0abb506093c7161b5aa4cad88df","user":{"login":"alanhamlett","id":522344,"avatar_url":"https://avatars.githubusercontent.com/u/522344?v=3","gravatar_id":"","url":"https://api.github.com/users/alanhamlett","html_url":"https://github.com/alanhamlett","followers_url":"https://api.github.com/users/alanhamlett/followers","following_url":"https://api.github.com/users/alanhamlett/following{/other_user}","gists_url":"https://api.github.com/users/alanhamlett/gists{/gist_id}","starred_url":"https://api.github.com/users/alanhamlett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanhamlett/subscriptions","organizations_url":"https://api.github.com/users/alanhamlett/orgs","repos_url":"https://api.github.com/users/alanhamlett/repos","events_url":"https://api.github.com/users/alanhamlett/events{/privacy}","received_events_url":"https://api.github.com/users/alanhamlett/received_events","type":"User","site_admin":false},"body":"This comment is out of context since the code it references is removed, so this comment shouldn't be here.","created_at":"2015-02-02T23:04:02Z","updated_at":"2015-02-02T23:04:02Z","html_url":"https://github.com/maxcountryman/flask-login/pull/196#discussion_r23967720","pull_request_url":"https://api.github.com/repos/maxcountryman/flask-login/pulls/196","_links":{"self":{"href":"https://api.github.com/repos/maxcountryman/flask-login/pulls/comments/23967720"},"html":{"href":"https://github.com/maxcountryman/flask-login/pull/196#discussion_r23967720"},"pull_request":{"href":"https://api.github.com/repos/maxcountryman/flask-login/pulls/196"}}},"pull_request":{"url":"https://api.github.com/repos/maxcountryman/flask-login/pulls/196","id":24078565,"html_url":"https://github.com/maxcountryman/flask-login/pull/196","diff_url":"https://github.com/maxcountryman/flask-login/pull/196.diff","patch_url":"https://github.com/maxcountryman/flask-login/pull/196.patch","issue_url":"https://api.github.com/repos/maxcountryman/flask-login/issues/196","number":196,"state":"open","locked":false,"title":"Fix session creation for every user","user":{"login":"Diaoul","id":319220,"avatar_url":"https://avatars.githubusercontent.com/u/319220?v=3","gravatar_id":"","url":"https://api.github.com/users/Diaoul","html_url":"https://github.com/Diaoul","followers_url":"https://api.github.com/users/Diaoul/followers","following_url":"https://api.github.com/users/Diaoul/following{/other_user}","gists_url":"https://api.github.com/users/Diaoul/gists{/gist_id}","starred_url":"https://api.github.com/users/Diaoul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Diaoul/subscriptions","organizations_url":"https://api.github.com/users/Diaoul/orgs","repos_url":"https://api.github.com/users/Diaoul/repos","events_url":"https://api.github.com/users/Diaoul/events{/privacy}","received_events_url":"https://api.github.com/users/Diaoul/received_events","type":"User","site_admin":false},"body":"This fixes a wrong behavior in the strong protection. Now the\r\nsession protection is only tested if a session exists and\r\nnothing is added to the session during the process.\r\nOnly one test is impacted and has been updated.","created_at":"2014-11-07T20:05:30Z","updated_at":"2015-02-02T23:04:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f1b57c094f5322458b131a897369cce0c6446b92","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/maxcountryman/flask-login/pulls/196/commits","review_comments_url":"https://api.github.com/repos/maxcountryman/flask-login/pulls/196/comments","review_comment_url":"https://api.github.com/repos/maxcountryman/flask-login/pulls/comments/{number}","comments_url":"https://api.github.com/repos/maxcountryman/flask-login/issues/196/comments","statuses_url":"https://api.github.com/repos/maxcountryman/flask-login/statuses/9c8f3ca7441fa0abb506093c7161b5aa4cad88df","head":{"label":"Diaoul:fix-session-protection","ref":"fix-session-protection","sha":"9c8f3ca7441fa0abb506093c7161b5aa4cad88df","user":{"login":"Diaoul","id":319220,"avatar_url":"https://avatars.githubusercontent.com/u/319220?v=3","gravatar_id":"","url":"https://api.github.com/users/Diaoul","html_url":"https://github.com/Diaoul","followers_url":"https://api.github.com/users/Diaoul/followers","following_url":"https://api.github.com/users/Diaoul/following{/other_user}","gists_url":"https://api.github.com/users/Diaoul/gists{/gist_id}","starred_url":"https://api.github.com/users/Diaoul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Diaoul/subscriptions","organizations_url":"https://api.github.com/users/Diaoul/orgs","repos_url":"https://api.github.com/users/Diaoul/repos","events_url":"https://api.github.com/users/Diaoul/events{/privacy}","received_events_url":"https://api.github.com/users/Diaoul/received_events","type":"User","site_admin":false},"repo":{"id":24560741,"name":"flask-login","full_name":"Diaoul/flask-login","owner":{"login":"Diaoul","id":319220,"avatar_url":"https://avatars.githubusercontent.com/u/319220?v=3","gravatar_id":"","url":"https://api.github.com/users/Diaoul","html_url":"https://github.com/Diaoul","followers_url":"https://api.github.com/users/Diaoul/followers","following_url":"https://api.github.com/users/Diaoul/following{/other_user}","gists_url":"https://api.github.com/users/Diaoul/gists{/gist_id}","starred_url":"https://api.github.com/users/Diaoul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Diaoul/subscriptions","organizations_url":"https://api.github.com/users/Diaoul/orgs","repos_url":"https://api.github.com/users/Diaoul/repos","events_url":"https://api.github.com/users/Diaoul/events{/privacy}","received_events_url":"https://api.github.com/users/Diaoul/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Diaoul/flask-login","description":"Flask user session management.","fork":true,"url":"https://api.github.com/repos/Diaoul/flask-login","forks_url":"https://api.github.com/repos/Diaoul/flask-login/forks","keys_url":"https://api.github.com/repos/Diaoul/flask-login/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Diaoul/flask-login/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Diaoul/flask-login/teams","hooks_url":"https://api.github.com/repos/Diaoul/flask-login/hooks","issue_events_url":"https://api.github.com/repos/Diaoul/flask-login/issues/events{/number}","events_url":"https://api.github.com/repos/Diaoul/flask-login/events","assignees_url":"https://api.github.com/repos/Diaoul/flask-login/assignees{/user}","branches_url":"https://api.github.com/repos/Diaoul/flask-login/branches{/branch}","tags_url":"https://api.github.com/repos/Diaoul/flask-login/tags","blobs_url":"https://api.github.com/repos/Diaoul/flask-login/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Diaoul/flask-login/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Diaoul/flask-login/git/refs{/sha}","trees_url":"https://api.github.com/repos/Diaoul/flask-login/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Diaoul/flask-login/statuses/{sha}","languages_url":"https://api.github.com/repos/Diaoul/flask-login/languages","stargazers_url":"https://api.github.com/repos/Diaoul/flask-login/stargazers","contributors_url":"https://api.github.com/repos/Diaoul/flask-login/contributors","subscribers_url":"https://api.github.com/repos/Diaoul/flask-login/subscribers","subscription_url":"https://api.github.com/repos/Diaoul/flask-login/subscription","commits_url":"https://api.github.com/repos/Diaoul/flask-login/commits{/sha}","git_commits_url":"https://api.github.com/repos/Diaoul/flask-login/git/commits{/sha}","comments_url":"https://api.github.com/repos/Diaoul/flask-login/comments{/number}","issue_comment_url":"https://api.github.com/repos/Diaoul/flask-login/issues/comments/{number}","contents_url":"https://api.github.com/repos/Diaoul/flask-login/contents/{+path}","compare_url":"https://api.github.com/repos/Diaoul/flask-login/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Diaoul/flask-login/merges","archive_url":"https://api.github.com/repos/Diaoul/flask-login/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Diaoul/flask-login/downloads","issues_url":"https://api.github.com/repos/Diaoul/flask-login/issues{/number}","pulls_url":"https://api.github.com/repos/Diaoul/flask-login/pulls{/number}","milestones_url":"https://api.github.com/repos/Diaoul/flask-login/milestones{/number}","notifications_url":"https://api.github.com/repos/Diaoul/flask-login/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Diaoul/flask-login/labels{/name}","releases_url":"https://api.github.com/repos/Diaoul/flask-login/releases{/id}","created_at":"2014-09-28T13:59:33Z","updated_at":"2014-09-28T06:18:45Z","pushed_at":"2014-11-11T18:40:32Z","git_url":"git://github.com/Diaoul/flask-login.git","ssh_url":"git@github.com:Diaoul/flask-login.git","clone_url":"https://github.com/Diaoul/flask-login.git","svn_url":"https://github.com/Diaoul/flask-login","homepage":"http://flask-login.readthedocs.org/en/latest/","size":386,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"maxcountryman:master","ref":"master","sha":"3fb6df94454d1cbc1c1afbb3acbe3718354ce0ca","user":{"login":"maxcountryman","id":74351,"avatar_url":"https://avatars.githubusercontent.com/u/74351?v=3","gravatar_id":"","url":"https://api.github.com/users/maxcountryman","html_url":"https://github.com/maxcountryman","followers_url":"https://api.github.com/users/maxcountryman/followers","following_url":"https://api.github.com/users/maxcountryman/following{/other_user}","gists_url":"https://api.github.com/users/maxcountryman/gists{/gist_id}","starred_url":"https://api.github.com/users/maxcountryman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxcountryman/subscriptions","organizations_url":"https://api.github.com/users/maxcountryman/orgs","repos_url":"https://api.github.com/users/maxcountryman/repos","events_url":"https://api.github.com/users/maxcountryman/events{/privacy}","received_events_url":"https://api.github.com/users/maxcountryman/received_events","type":"User","site_admin":false},"repo":{"id":3687291,"name":"flask-login","full_name":"maxcountryman/flask-login","owner":{"login":"maxcountryman","id":74351,"avatar_url":"https://avatars.githubusercontent.com/u/74351?v=3","gravatar_id":"","url":"https://api.github.com/users/maxcountryman","html_url":"https://github.com/maxcountryman","followers_url":"https://api.github.com/users/maxcountryman/followers","following_url":"https://api.github.com/users/maxcountryman/following{/other_user}","gists_url":"https://api.github.com/users/maxcountryman/gists{/gist_id}","starred_url":"https://api.github.com/users/maxcountryman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxcountryman/subscriptions","organizations_url":"https://api.github.com/users/maxcountryman/orgs","repos_url":"https://api.github.com/users/maxcountryman/repos","events_url":"https://api.github.com/users/maxcountryman/events{/privacy}","received_events_url":"https://api.github.com/users/maxcountryman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maxcountryman/flask-login","description":"Flask user session management.","fork":false,"url":"https://api.github.com/repos/maxcountryman/flask-login","forks_url":"https://api.github.com/repos/maxcountryman/flask-login/forks","keys_url":"https://api.github.com/repos/maxcountryman/flask-login/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maxcountryman/flask-login/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maxcountryman/flask-login/teams","hooks_url":"https://api.github.com/repos/maxcountryman/flask-login/hooks","issue_events_url":"https://api.github.com/repos/maxcountryman/flask-login/issues/events{/number}","events_url":"https://api.github.com/repos/maxcountryman/flask-login/events","assignees_url":"https://api.github.com/repos/maxcountryman/flask-login/assignees{/user}","branches_url":"https://api.github.com/repos/maxcountryman/flask-login/branches{/branch}","tags_url":"https://api.github.com/repos/maxcountryman/flask-login/tags","blobs_url":"https://api.github.com/repos/maxcountryman/flask-login/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maxcountryman/flask-login/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maxcountryman/flask-login/git/refs{/sha}","trees_url":"https://api.github.com/repos/maxcountryman/flask-login/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maxcountryman/flask-login/statuses/{sha}","languages_url":"https://api.github.com/repos/maxcountryman/flask-login/languages","stargazers_url":"https://api.github.com/repos/maxcountryman/flask-login/stargazers","contributors_url":"https://api.github.com/repos/maxcountryman/flask-login/contributors","subscribers_url":"https://api.github.com/repos/maxcountryman/flask-login/subscribers","subscription_url":"https://api.github.com/repos/maxcountryman/flask-login/subscription","commits_url":"https://api.github.com/repos/maxcountryman/flask-login/commits{/sha}","git_commits_url":"https://api.github.com/repos/maxcountryman/flask-login/git/commits{/sha}","comments_url":"https://api.github.com/repos/maxcountryman/flask-login/comments{/number}","issue_comment_url":"https://api.github.com/repos/maxcountryman/flask-login/issues/comments/{number}","contents_url":"https://api.github.com/repos/maxcountryman/flask-login/contents/{+path}","compare_url":"https://api.github.com/repos/maxcountryman/flask-login/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maxcountryman/flask-login/merges","archive_url":"https://api.github.com/repos/maxcountryman/flask-login/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maxcountryman/flask-login/downloads","issues_url":"https://api.github.com/repos/maxcountryman/flask-login/issues{/number}","pulls_url":"https://api.github.com/repos/maxcountryman/flask-login/pulls{/number}","milestones_url":"https://api.github.com/repos/maxcountryman/flask-login/milestones{/number}","notifications_url":"https://api.github.com/repos/maxcountryman/flask-login/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maxcountryman/flask-login/labels{/name}","releases_url":"https://api.github.com/repos/maxcountryman/flask-login/releases{/id}","created_at":"2012-03-11T14:42:33Z","updated_at":"2015-02-02T03:00:02Z","pushed_at":"2015-02-02T03:00:02Z","git_url":"git://github.com/maxcountryman/flask-login.git","ssh_url":"git@github.com:maxcountryman/flask-login.git","clone_url":"https://github.com/maxcountryman/flask-login.git","svn_url":"https://github.com/maxcountryman/flask-login","homepage":"http://flask-login.readthedocs.org/en/latest/","size":1794,"stargazers_count":631,"watchers_count":631,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":203,"mirror_url":null,"open_issues_count":15,"forks":203,"open_issues":15,"watchers":631,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/maxcountryman/flask-login/pulls/196"},"html":{"href":"https://github.com/maxcountryman/flask-login/pull/196"},"issue":{"href":"https://api.github.com/repos/maxcountryman/flask-login/issues/196"},"comments":{"href":"https://api.github.com/repos/maxcountryman/flask-login/issues/196/comments"},"review_comments":{"href":"https://api.github.com/repos/maxcountryman/flask-login/pulls/196/comments"},"review_comment":{"href":"https://api.github.com/repos/maxcountryman/flask-login/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/maxcountryman/flask-login/pulls/196/commits"},"statuses":{"href":"https://api.github.com/repos/maxcountryman/flask-login/statuses/9c8f3ca7441fa0abb506093c7161b5aa4cad88df"}}}}