{"action":"opened","issue":{"url":"https://api.github.com/repos/elastic/kibana/issues/14665","repository_url":"https://api.github.com/repos/elastic/kibana","labels_url":"https://api.github.com/repos/elastic/kibana/issues/14665/labels{/name}","comments_url":"https://api.github.com/repos/elastic/kibana/issues/14665/comments","events_url":"https://api.github.com/repos/elastic/kibana/issues/14665/events","html_url":"https://github.com/elastic/kibana/issues/14665","id":269522939,"number":14665,"title":"GET doc in dev tools with request body overwrites the existing document","user":{"login":"sebnmuller","id":3919957,"avatar_url":"https://avatars0.githubusercontent.com/u/3919957?v=4","gravatar_id":"","url":"https://api.github.com/users/sebnmuller","html_url":"https://github.com/sebnmuller","followers_url":"https://api.github.com/users/sebnmuller/followers","following_url":"https://api.github.com/users/sebnmuller/following{/other_user}","gists_url":"https://api.github.com/users/sebnmuller/gists{/gist_id}","starred_url":"https://api.github.com/users/sebnmuller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebnmuller/subscriptions","organizations_url":"https://api.github.com/users/sebnmuller/orgs","repos_url":"https://api.github.com/users/sebnmuller/repos","events_url":"https://api.github.com/users/sebnmuller/events{/privacy}","received_events_url":"https://api.github.com/users/sebnmuller/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-30T08:57:20Z","updated_at":"2017-10-30T08:57:20Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nGitHub is reserved for bug reports and feature requests. The best place\r\nto ask a general question is at the Elastic Discourse forums at\r\nhttps://discuss.elastic.co. If you are in fact posting a bug report or\r\na feature request, please include one and only one of the below blocks\r\nin your new issue.\r\n-->\r\n\r\n<!--\r\nIf you are filing a bug report, please remove the below feature\r\nrequest block and provide responses for all of the below items.\r\n-->\r\n\r\n**Kibana version**:\r\n 5.6.2\r\n\r\n**Elasticsearch version**:\r\nVersion: 5.6.2, Build: 57e20f3/2017-09-23T13:16:45.703Z, JVM: 1.8.0_144\r\n\r\n**Server OS version**:\r\nMacOS Sierra 10.12.6\r\n\r\n**Browser version**:\r\nGoogle Chrome\r\n\r\n**Browser OS version**:\r\nVersion 62.0.3202.75 (Official Build) (64-bit)\r\n\r\n**Original install method (e.g. download page, yum, from source, etc.)**:\r\nhttps://artifacts.elastic.co/downloads/kibana/kibana-5.6.2-darwin-x86_64.tar.gz\r\n\r\n**Description of the problem including expected versus actual behaviour**:\r\nI came upon this accidentally. When getting a document in **DevTools** i.e. GET index/type/id with a request payload, the original document is overwritten **entirely** with the raw value of the request payload.\r\n\r\nI didn't expect that getting a document could update and overwrite the document itself.\r\n\r\nThis only seems to happen when performing operations in DevTools. Running the same Get with a payload using **curl** does **not** overwrite the document.\r\n\r\n**Steps to reproduce**:\r\nIn DevTools:\r\n\r\n 1. Create a test document\r\n\r\n```\r\nPOST test/test/1\r\n{\r\n  \"field1\": \"value1\",\r\n  \"field2\": \"value2\",\r\n  \"message\": \"values I don't want to overwrite\"\r\n}\r\n```\r\n\r\n 2. Confirm doc exists and contains expected content\r\n\r\n```\r\nGET /test/test/1\r\n```\r\n\r\n 3. GET doc with payload\r\n\r\n```\r\nGET test/test/1\r\n{\r\n  \"field\": \"value\"\r\n}\r\n```\r\n\r\n4. Confirm doc's entire content's overwritten with `\"field\": \"value\"`\r\n\r\n```\r\nGET /test/test/1\r\n```\r\n\r\n**Errors in browser console (if relevant)**:\r\n\r\n**Provide logs and/or server output (if relevant)**:\r\nThe GET with a request payload get's turned into a POST:\r\n![image](https://user-images.githubusercontent.com/3919957/32162045-e41b0228-bd57-11e7-83d6-4dc800cfea6b.png)\r\n"}}
{"actor":{"display_login":"sebnmuller"}}