{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/14252","repository_url":"https://api.github.com/repos/yiisoft/yii2","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/14252/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/14252/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/14252/events","html_url":"https://github.com/yiisoft/yii2/issues/14252","id":233455493,"number":14252,"title":"csrf","user":{"login":"sapsxxxil","id":18054966,"avatar_url":"https://avatars2.githubusercontent.com/u/18054966?v=3","gravatar_id":"","url":"https://api.github.com/users/sapsxxxil","html_url":"https://github.com/sapsxxxil","followers_url":"https://api.github.com/users/sapsxxxil/followers","following_url":"https://api.github.com/users/sapsxxxil/following{/other_user}","gists_url":"https://api.github.com/users/sapsxxxil/gists{/gist_id}","starred_url":"https://api.github.com/users/sapsxxxil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sapsxxxil/subscriptions","organizations_url":"https://api.github.com/users/sapsxxxil/orgs","repos_url":"https://api.github.com/users/sapsxxxil/repos","events_url":"https://api.github.com/users/sapsxxxil/events{/privacy}","received_events_url":"https://api.github.com/users/sapsxxxil/received_events","type":"User","site_admin":false},"labels":[{"id":315614343,"url":"https://api.github.com/repos/yiisoft/yii2/labels/question","name":"question","color":"d4c5f9","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":26,"created_at":"2017-06-04T19:51:47Z","updated_at":"2017-06-07T09:44:21Z","closed_at":"2017-06-06T11:31:20Z","body":"### What steps will reproduce the problem?\r\nЗдравствуйте, версия yii 2.0.11.2 передаю ajax запрос:\r\n$.ajax({\r\n    type: \"POST\",\r\n    url: '/test',\r\n    dataType: 'json',\r\n    data: {\r\n        '_csrf': $('meta[name=\"csrf-token\"]').attr('content'),\r\n        'test': 5\r\n    },\r\n    success: function (server) {\r\n        console.log(server);\r\n    }\r\n});\r\nне во всех браузерах он работает например в опере ответ от сервера (400 (Bad Request))\r\n### What is the expected result?\r\nСервер должен ответить без ошибок. \r\n### What do you get instead?\r\nОтвет сервера.\r\n\r\n### Additional info\r\nКак я понял проблема в _csrf  не во всех браузерах он работает при передаче через ajax\r\n| Q                | A\r\n| ---------------- | ---\r\n| Yii version      | 2.0.11.2?\r\n| PHP version     |  5.5.31\r\n| Operating system | \tLinux rt.ru 2.6.32-042stab112.15 #1 SMP Tue Oct 20 17:22:56 MSK 2015 x86_64\r\n"},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/comments/306745576","html_url":"https://github.com/yiisoft/yii2/issues/14252#issuecomment-306745576","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/14252","id":306745576,"user":{"login":"Kolyunya","id":2682768,"avatar_url":"https://avatars1.githubusercontent.com/u/2682768?v=3","gravatar_id":"","url":"https://api.github.com/users/Kolyunya","html_url":"https://github.com/Kolyunya","followers_url":"https://api.github.com/users/Kolyunya/followers","following_url":"https://api.github.com/users/Kolyunya/following{/other_user}","gists_url":"https://api.github.com/users/Kolyunya/gists{/gist_id}","starred_url":"https://api.github.com/users/Kolyunya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kolyunya/subscriptions","organizations_url":"https://api.github.com/users/Kolyunya/orgs","repos_url":"https://api.github.com/users/Kolyunya/repos","events_url":"https://api.github.com/users/Kolyunya/events{/privacy}","received_events_url":"https://api.github.com/users/Kolyunya/received_events","type":"User","site_admin":false},"created_at":"2017-06-07T09:44:21Z","updated_at":"2017-06-07T09:44:21Z","body":"@samdark I'm just saying that the page @sapsxxxil posted a link to does not send a `CSRF` cookie for me. I think that may be the source of the problem."}}
{"actor":{"display_login":"Kolyunya"}}