{"action":"created","issue":{"url":"https://api.github.com/repos/kdave/btrfsmaintenance/issues/48","repository_url":"https://api.github.com/repos/kdave/btrfsmaintenance","labels_url":"https://api.github.com/repos/kdave/btrfsmaintenance/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/kdave/btrfsmaintenance/issues/48/comments","events_url":"https://api.github.com/repos/kdave/btrfsmaintenance/issues/48/events","html_url":"https://github.com/kdave/btrfsmaintenance/pull/48","id":296380472,"number":48,"title":"Protect strings on subshell/stat calls","user":{"login":"comio","id":277587,"avatar_url":"https://avatars0.githubusercontent.com/u/277587?v=4","gravatar_id":"","url":"https://api.github.com/users/comio","html_url":"https://github.com/comio","followers_url":"https://api.github.com/users/comio/followers","following_url":"https://api.github.com/users/comio/following{/other_user}","gists_url":"https://api.github.com/users/comio/gists{/gist_id}","starred_url":"https://api.github.com/users/comio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/comio/subscriptions","organizations_url":"https://api.github.com/users/comio/orgs","repos_url":"https://api.github.com/users/comio/repos","events_url":"https://api.github.com/users/comio/events{/privacy}","received_events_url":"https://api.github.com/users/comio/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/kdave/btrfsmaintenance/milestones/2","html_url":"https://github.com/kdave/btrfsmaintenance/milestone/2","labels_url":"https://api.github.com/repos/kdave/btrfsmaintenance/milestones/2/labels","id":3049281,"number":2,"title":"v0.4.1","description":"","creator":{"login":"kdave","id":1729844,"avatar_url":"https://avatars2.githubusercontent.com/u/1729844?v=4","gravatar_id":"","url":"https://api.github.com/users/kdave","html_url":"https://github.com/kdave","followers_url":"https://api.github.com/users/kdave/followers","following_url":"https://api.github.com/users/kdave/following{/other_user}","gists_url":"https://api.github.com/users/kdave/gists{/gist_id}","starred_url":"https://api.github.com/users/kdave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdave/subscriptions","organizations_url":"https://api.github.com/users/kdave/orgs","repos_url":"https://api.github.com/users/kdave/repos","events_url":"https://api.github.com/users/kdave/events{/privacy}","received_events_url":"https://api.github.com/users/kdave/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":3,"state":"open","created_at":"2018-01-19T18:52:49Z","updated_at":"2018-02-19T19:21:10Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2018-02-12T13:48:54Z","updated_at":"2018-02-19T19:21:10Z","closed_at":"2018-02-19T19:21:10Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/kdave/btrfsmaintenance/pulls/48","html_url":"https://github.com/kdave/btrfsmaintenance/pull/48","diff_url":"https://github.com/kdave/btrfsmaintenance/pull/48.diff","patch_url":"https://github.com/kdave/btrfsmaintenance/pull/48.patch"},"body":"All scripts create subshells and compare the resulting output string with construct like this:\r\n```\r\nif [ $(stat ... \"$P\") != \"btrfs\" ]; then\r\n...\r\nfi\r\n```\r\nthis construct doesn't protect from empty strings obtaining a syntax error.\r\n\r\nTo solve, we must use \"eval\" in order to solve escaping and protect the result:\r\n\r\n```\r\nif [ \"$(eval stat ... \\\"$P\\\")\" != \"btrfs\" ]; then\r\n...\r\nfi\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/kdave/btrfsmaintenance/issues/comments/366782598","html_url":"https://github.com/kdave/btrfsmaintenance/pull/48#issuecomment-366782598","issue_url":"https://api.github.com/repos/kdave/btrfsmaintenance/issues/48","id":366782598,"user":{"login":"kdave","id":1729844,"avatar_url":"https://avatars2.githubusercontent.com/u/1729844?v=4","gravatar_id":"","url":"https://api.github.com/users/kdave","html_url":"https://github.com/kdave","followers_url":"https://api.github.com/users/kdave/followers","following_url":"https://api.github.com/users/kdave/following{/other_user}","gists_url":"https://api.github.com/users/kdave/gists{/gist_id}","starred_url":"https://api.github.com/users/kdave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdave/subscriptions","organizations_url":"https://api.github.com/users/kdave/orgs","repos_url":"https://api.github.com/users/kdave/repos","events_url":"https://api.github.com/users/kdave/events{/privacy}","received_events_url":"https://api.github.com/users/kdave/received_events","type":"User","site_admin":false},"created_at":"2018-02-19T19:21:10Z","updated_at":"2018-02-19T19:21:10Z","author_association":"OWNER","body":"Applied, thanks. I've squashed the 2 commits and updated the changelog."}}
{"actor":{"display_login":"kdave"}}