{"action":"opened","issue":{"url":"https://api.github.com/repos/Tropicalista/SuperSeo/issues/6","repository_url":"https://api.github.com/repos/Tropicalista/SuperSeo","labels_url":"https://api.github.com/repos/Tropicalista/SuperSeo/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/Tropicalista/SuperSeo/issues/6/comments","events_url":"https://api.github.com/repos/Tropicalista/SuperSeo/issues/6/events","html_url":"https://github.com/Tropicalista/SuperSeo/issues/6","id":231733638,"number":6,"title":"google.json is a security risk","user":{"login":"GunnarLieb","id":2843376,"avatar_url":"https://avatars3.githubusercontent.com/u/2843376?v=3","gravatar_id":"","url":"https://api.github.com/users/GunnarLieb","html_url":"https://github.com/GunnarLieb","followers_url":"https://api.github.com/users/GunnarLieb/followers","following_url":"https://api.github.com/users/GunnarLieb/following{/other_user}","gists_url":"https://api.github.com/users/GunnarLieb/gists{/gist_id}","starred_url":"https://api.github.com/users/GunnarLieb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GunnarLieb/subscriptions","organizations_url":"https://api.github.com/users/GunnarLieb/orgs","repos_url":"https://api.github.com/users/GunnarLieb/repos","events_url":"https://api.github.com/users/GunnarLieb/events{/privacy}","received_events_url":"https://api.github.com/users/GunnarLieb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-26T20:59:26Z","updated_at":"2017-05-26T20:59:26Z","closed_at":null,"body":"Putting the google.json file is a securuty risk, it can be read via /modules/contentbox/modules_user/superseo/models/google.json\r\n\r\nI think a better approach will to to add it as setting in Conf or as a Setting in database. \r\nI have checked the GoogleCredential Javadocs and couldn't find a method to set Json via string.\r\n\r\nSo you could to the following `\r\n\t\tvar stringReader              = createObject(\"java\", \"java.io.StringReader\");\r\n\t\tvar googleSettings = stringReader.init(' .... JSON FOLLOWS HERE (PULL FROM SETTINGS\r\n');\r\n\t\tvariables.ReaderInputStream\t\t\t= createObject(\"java\", \"org.apache.commons.io.input.ReaderInputStream\");\r\n\t\t\r\n\t\tvar fakeStream = variables.ReaderInputStream.init(googleSettings);\r\n\t\t\r\n\t\treturn variables.credential\r\n\t\t\t.fromStream( fakeStream, //INSTEAD OF variables.fileObj.init(getFileName()),\r\n\r\n`"}}
{"actor":{"display_login":"GunnarLieb"}}