{"action":"created","issue":{"url":"https://api.github.com/repos/lukeb-uk/node-promise-mysql/issues/5","labels_url":"https://api.github.com/repos/lukeb-uk/node-promise-mysql/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/lukeb-uk/node-promise-mysql/issues/5/comments","events_url":"https://api.github.com/repos/lukeb-uk/node-promise-mysql/issues/5/events","html_url":"https://github.com/lukeb-uk/node-promise-mysql/issues/5","id":60481554,"number":5,"title":"connection.escape method is not present in the connection object","user":{"login":"gajus","id":973543,"avatar_url":"https://avatars.githubusercontent.com/u/973543?v=3","gravatar_id":"","url":"https://api.github.com/users/gajus","html_url":"https://github.com/gajus","followers_url":"https://api.github.com/users/gajus/followers","following_url":"https://api.github.com/users/gajus/following{/other_user}","gists_url":"https://api.github.com/users/gajus/gists{/gist_id}","starred_url":"https://api.github.com/users/gajus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gajus/subscriptions","organizations_url":"https://api.github.com/users/gajus/orgs","repos_url":"https://api.github.com/users/gajus/repos","events_url":"https://api.github.com/users/gajus/events{/privacy}","received_events_url":"https://api.github.com/users/gajus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-10T10:53:28Z","updated_at":"2015-03-10T11:15:08Z","closed_at":null,"body":"> In order to avoid SQL Injection attacks, you should always escape any user provided data before using it inside a SQL query. You can do so using the mysql.escape(), connection.escape() or pool.escape() methods\r\n\r\n– https://www.npmjs.com/package/mysql#escaping-query-values\r\n\r\nQuick fix until this is resolved in the main package:\r\n\r\n```js\r\ndb = mysql.createConnection(config);\r\ndb.escape = mysql.escape;\r\n```"},"comment":{"url":"https://api.github.com/repos/lukeb-uk/node-promise-mysql/issues/comments/78034691","html_url":"https://github.com/lukeb-uk/node-promise-mysql/issues/5#issuecomment-78034691","issue_url":"https://api.github.com/repos/lukeb-uk/node-promise-mysql/issues/5","id":78034691,"user":{"login":"lukeb-uk","id":4780756,"avatar_url":"https://avatars.githubusercontent.com/u/4780756?v=3","gravatar_id":"","url":"https://api.github.com/users/lukeb-uk","html_url":"https://github.com/lukeb-uk","followers_url":"https://api.github.com/users/lukeb-uk/followers","following_url":"https://api.github.com/users/lukeb-uk/following{/other_user}","gists_url":"https://api.github.com/users/lukeb-uk/gists{/gist_id}","starred_url":"https://api.github.com/users/lukeb-uk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukeb-uk/subscriptions","organizations_url":"https://api.github.com/users/lukeb-uk/orgs","repos_url":"https://api.github.com/users/lukeb-uk/repos","events_url":"https://api.github.com/users/lukeb-uk/events{/privacy}","received_events_url":"https://api.github.com/users/lukeb-uk/received_events","type":"User","site_admin":false},"created_at":"2015-03-10T11:15:08Z","updated_at":"2015-03-10T11:15:08Z","body":"It's exposed on a specific connection object[0], but I'll look at linking it up in the main package.\r\n\r\n[0]: https://github.com/lukeb-uk/node-promise-mysql/blob/master/lib/connection.js#L97"}}