{"action":"opened","issue":{"url":"https://api.github.com/repos/angular/angular/issues/13313","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/13313/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/13313/comments","events_url":"https://api.github.com/repos/angular/angular/issues/13313/events","html_url":"https://github.com/angular/angular/issues/13313","id":194412305,"number":13313,"title":"CookieXSRFStrategy send old values of the CSRF token after relogin to app (right after we received new cookie value)","user":{"login":"VitalyVrublevskyy","id":8617175,"avatar_url":"https://avatars.githubusercontent.com/u/8617175?v=3","gravatar_id":"","url":"https://api.github.com/users/VitalyVrublevskyy","html_url":"https://github.com/VitalyVrublevskyy","followers_url":"https://api.github.com/users/VitalyVrublevskyy/followers","following_url":"https://api.github.com/users/VitalyVrublevskyy/following{/other_user}","gists_url":"https://api.github.com/users/VitalyVrublevskyy/gists{/gist_id}","starred_url":"https://api.github.com/users/VitalyVrublevskyy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VitalyVrublevskyy/subscriptions","organizations_url":"https://api.github.com/users/VitalyVrublevskyy/orgs","repos_url":"https://api.github.com/users/VitalyVrublevskyy/repos","events_url":"https://api.github.com/users/VitalyVrublevskyy/events{/privacy}","received_events_url":"https://api.github.com/users/VitalyVrublevskyy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-08T18:42:51Z","updated_at":"2016-12-08T18:42:51Z","closed_at":null,"body":"<!--\r\nIF YOU DON'T FILL OUT THE FOLLOWING INFORMATION WE MIGHT CLOSE YOUR ISSUE WITHOUT INVESTIGATING\r\n-->\r\n\r\n**I'm submitting a ...**  (check one with \"x\")\r\n```\r\n[ x] bug report => search github for a similar issue or PR before submitting\r\n[ ] feature request\r\n[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\r\n```\r\n\r\n\r\n**Current behavior**\r\nCSRF token is incorrect. We send old version of token.\r\n\r\n**Expected behavior**\r\nWe should inject CSRFToken related header based on current value of token from cookies.\r\n\r\n**Minimal reproduction of the problem with instructions**\r\nIn my application I use CookieXSRFStrategy to handle CSRF token like this:\r\n![image](https://cloud.githubusercontent.com/assets/8617175/21022121/18f54f0a-bd84-11e6-871a-e964dabdd450.png)\r\n\r\n*STEPS TO REPRODUCE* \r\n1. Login to some application. In response I received cookies:\r\ncsrftoken=_PONBJe51vUEydcyLAXBiG2K1f53az3Oh_\r\n2. Do any server request: Verify that we have valid 'X-CSRFToken' in each request's header.\r\n3. Logout from application. \r\n- Force clear cookies  _csrftoken_ manually or programatically.\r\n4. Login again to application.\r\n- Received new csrftoken=_nOZlQHVNJqfDu9XUrzWsAfJfjou5HxC0_ in cookie\r\n5. Do any server request and verify that sent OLD TOKEN (in my example: _PONBJe51vUEydcyLAXBiG2K1f53az3Oh_)\r\n\r\n**What is the motivation / use case for changing the behavior?**\r\nBecause it's most common feature.\r\n\r\n**Please tell us about your environment:**\r\nMac Os, Webstorm, npm\r\n<!-- Operating system, IDE, package manager, HTTP server, ... -->\r\n\r\n* **Angular version:** 2.1.2\r\n\r\n* **Browser:** Chrome Version 54.0.2840.98 (64-bit)]\r\n \r\n* **Language:** [all | TypeScript 2.0.3 | ES6/7 | ES5]\r\n\r\n  \r\n"}}
{"actor":{"display_login":"VitalyVrublevskyy"}}