{"action":"created","issue":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/1893","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/1893/labels{/name}","comments_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/1893/comments","events_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/1893/events","html_url":"https://github.com/fish-shell/fish-shell/issues/1893","id":54359505,"number":1893,"title":"Pasting JSON causes Fish to hang on OSX, disconnect in Ubuntu","user":{"login":"trahma","id":645848,"avatar_url":"https://avatars.githubusercontent.com/u/645848?v=3","gravatar_id":"","url":"https://api.github.com/users/trahma","html_url":"https://github.com/trahma","followers_url":"https://api.github.com/users/trahma/followers","following_url":"https://api.github.com/users/trahma/following{/other_user}","gists_url":"https://api.github.com/users/trahma/gists{/gist_id}","starred_url":"https://api.github.com/users/trahma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trahma/subscriptions","organizations_url":"https://api.github.com/users/trahma/orgs","repos_url":"https://api.github.com/users/trahma/repos","events_url":"https://api.github.com/users/trahma/events{/privacy}","received_events_url":"https://api.github.com/users/trahma/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/fish-shell/fish-shell/milestones/4","labels_url":"https://api.github.com/repos/fish-shell/fish-shell/milestones/4/labels","id":130257,"number":4,"title":"fish-future","description":"These are bugs that are not targeted for an upcoming release. After a release, we will reexamine these bugs and pull any in that we think are good targets.\r\n\r\nIf you can provide a fix for a bug in this milestone, we'll generally accept it for the next release even if the bug is not in the release.","creator":{"login":"ridiculousfish","id":920838,"avatar_url":"https://avatars.githubusercontent.com/u/920838?v=3","gravatar_id":"","url":"https://api.github.com/users/ridiculousfish","html_url":"https://github.com/ridiculousfish","followers_url":"https://api.github.com/users/ridiculousfish/followers","following_url":"https://api.github.com/users/ridiculousfish/following{/other_user}","gists_url":"https://api.github.com/users/ridiculousfish/gists{/gist_id}","starred_url":"https://api.github.com/users/ridiculousfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ridiculousfish/subscriptions","organizations_url":"https://api.github.com/users/ridiculousfish/orgs","repos_url":"https://api.github.com/users/ridiculousfish/repos","events_url":"https://api.github.com/users/ridiculousfish/events{/privacy}","received_events_url":"https://api.github.com/users/ridiculousfish/received_events","type":"User","site_admin":false},"open_issues":380,"closed_issues":69,"state":"open","created_at":"2012-06-11T02:25:13Z","updated_at":"2015-01-14T18:54:50Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-01-14T18:43:52Z","updated_at":"2015-01-14T19:01:12Z","closed_at":null,"body":"While working within Fish I accidentally pasted JSON content in my clipboard which caused fish to use 400% of my CPU, eventually lowering down to 30% which then caused kernel_task to spike to 80-100% and hold for over 15 minutes.  Attempting to replicate this on a remote Ubuntu, it causes my SSH connection to close out.\r\n\r\nJSON Sample\r\n===========\r\n\r\n{\"preview\":true,\"offset\":0,\"result\":{\"client_ip\":\"\",\"count\":\"\"}}\r\n{\"preview\":true,\"offset\":1,\"result\":{\"client_ip\":\"\",\"count\":\"\"}}\r\n{\"preview\":true,\"offset\":2,\"result\":{\"client_ip\":\"\",\"count\":\"\"}}\r\n{\"preview\":true,\"offset\":3,\"result\":{\"client_ip\":\"\",\"count\":\"\"}}\r\n{\"preview\":true,\"offset\":4,\"result\":{\"client_ip\":\"\",\"count\":\"\"}}\r\n{\"preview\":true,\"offset\":5,\"result\":{\"client_ip\":\"\",\"count\":\"\"}}\r\n{\"preview\":true,\"offset\":6,\"result\":{\"client_ip\":\"\",\"count\":\"\"}}\r\n{\"preview\":true,\"offset\":7,\"result\":{\"client_ip\":\"\",\"count\":\"\"}}\r\n{\"preview\":true,\"offset\":8,\"lastrow\":true,\"result\":{\"client_ip\":\"\",\"count\":\"\"}}\r\n{\"preview\":false,\"offset\":0,\"result\":{\"client_ip\":\"0\",\"count\":\"\"}}\r\n{\"preview\":false,\"offset\":1,\"result\":{\"client_ip\":\"\",\"count\":\"\"}}\r\n{\"preview\":false,\"offset\":2,\"result\":{\"client_ip\":\"\",\"count\":\"\"}}\r\n{\"preview\":false,\"offset\":3,\"result\":{\"client_ip\":\"\",\"count\":\"\"}}\r\n{\"preview\":false,\"offset\":4,\"result\":{\"client_ip\":\"\",\"count\":\"\"}}\r\n{\"preview\":false,\"offset\":5,\"result\":{\"client_ip\":\"\",\"count\":\"\"}}\r\n{\"preview\":false,\"offset\":6,\"result\":{\"client_ip\":\"\",\"count\":\"\"}}\r\n{\"preview\":false,\"offset\":7,\"result\":{\"client_ip\":\"\",\"count\":\"\"}}\r\n{\"preview\":false,\"offset\":8,\"lastrow\":true,\"result\":{\"client_ip\":\"\",\"count\":\"\"}}"},"comment":{"url":"https://api.github.com/repos/fish-shell/fish-shell/issues/comments/69970864","html_url":"https://github.com/fish-shell/fish-shell/issues/1893#issuecomment-69970864","issue_url":"https://api.github.com/repos/fish-shell/fish-shell/issues/1893","id":69970864,"user":{"login":"ridiculousfish","id":920838,"avatar_url":"https://avatars.githubusercontent.com/u/920838?v=3","gravatar_id":"","url":"https://api.github.com/users/ridiculousfish","html_url":"https://github.com/ridiculousfish","followers_url":"https://api.github.com/users/ridiculousfish/followers","following_url":"https://api.github.com/users/ridiculousfish/following{/other_user}","gists_url":"https://api.github.com/users/ridiculousfish/gists{/gist_id}","starred_url":"https://api.github.com/users/ridiculousfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ridiculousfish/subscriptions","organizations_url":"https://api.github.com/users/ridiculousfish/orgs","repos_url":"https://api.github.com/users/ridiculousfish/repos","events_url":"https://api.github.com/users/ridiculousfish/events{/privacy}","received_events_url":"https://api.github.com/users/ridiculousfish/received_events","type":"User","site_admin":false},"created_at":"2015-01-14T19:01:12Z","updated_at":"2015-01-14T19:01:12Z","body":"bash and zsh will die if you pass that JSON to echo and then hit return. I guess fish is more vulnerable because it attempts to expand the string before execution (for syntax highlighting, etc) so you don't have to hit return."}}