{"action":"created","issue":{"url":"https://api.github.com/repos/BigBrotherBot/big-brother-bot/issues/281","labels_url":"https://api.github.com/repos/BigBrotherBot/big-brother-bot/issues/281/labels{/name}","comments_url":"https://api.github.com/repos/BigBrotherBot/big-brother-bot/issues/281/comments","events_url":"https://api.github.com/repos/BigBrotherBot/big-brother-bot/issues/281/events","html_url":"https://github.com/BigBrotherBot/big-brother-bot/issues/281","id":56948006,"number":281,"title":"[CS:GO] Events causing a sql error","user":{"login":"Thomaxius","id":5205363,"avatar_url":"https://avatars.githubusercontent.com/u/5205363?v=3","gravatar_id":"","url":"https://api.github.com/users/Thomaxius","html_url":"https://github.com/Thomaxius","followers_url":"https://api.github.com/users/Thomaxius/followers","following_url":"https://api.github.com/users/Thomaxius/following{/other_user}","gists_url":"https://api.github.com/users/Thomaxius/gists{/gist_id}","starred_url":"https://api.github.com/users/Thomaxius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thomaxius/subscriptions","organizations_url":"https://api.github.com/users/Thomaxius/orgs","repos_url":"https://api.github.com/users/Thomaxius/repos","events_url":"https://api.github.com/users/Thomaxius/events{/privacy}","received_events_url":"https://api.github.com/users/Thomaxius/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-08T11:16:25Z","updated_at":"2015-02-08T12:26:49Z","closed_at":null,"body":"So, csgo has events 'throw' and 'purchased', which both cause a SQL error:\r\n150208 00:44:06\tCONSOLE\t'L 02/08/2015 - 00:44:06: \"Ivan<32><BOT><CT>\" threw hegrenade [-578 -846 -304]'\r\n150208 00:44:06\tERROR\tu'Query failed [INSERT INTO xlr_actionstats (`name`, `count`) VALUES (\"threw \"hegrenade\"\", 1)] (mysql error crap here)\r\n\r\nNow, this is easily fixed by changing cs:go parser:\r\nreturn self.getEvent(\"EVT_CLIENT_ACTION\", client=client, data='threw \"%s\"' % item)\r\nto\r\nreturn self.getEvent(\"EVT_CLIENT_ACTION\", client=client, data='threw %s' % item)\r\n\r\nBut I'm wondering if this is a sqlite thing again, and one would have to find a solution that works for both protocols. Or I can just push that code and it works fine for both?"},"comment":{"url":"https://api.github.com/repos/BigBrotherBot/big-brother-bot/issues/comments/73408739","html_url":"https://github.com/BigBrotherBot/big-brother-bot/issues/281#issuecomment-73408739","issue_url":"https://api.github.com/repos/BigBrotherBot/big-brother-bot/issues/281","id":73408739,"user":{"login":"danielepantaleone","id":1245124,"avatar_url":"https://avatars.githubusercontent.com/u/1245124?v=3","gravatar_id":"","url":"https://api.github.com/users/danielepantaleone","html_url":"https://github.com/danielepantaleone","followers_url":"https://api.github.com/users/danielepantaleone/followers","following_url":"https://api.github.com/users/danielepantaleone/following{/other_user}","gists_url":"https://api.github.com/users/danielepantaleone/gists{/gist_id}","starred_url":"https://api.github.com/users/danielepantaleone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielepantaleone/subscriptions","organizations_url":"https://api.github.com/users/danielepantaleone/orgs","repos_url":"https://api.github.com/users/danielepantaleone/repos","events_url":"https://api.github.com/users/danielepantaleone/events{/privacy}","received_events_url":"https://api.github.com/users/danielepantaleone/received_events","type":"User","site_admin":false},"created_at":"2015-02-08T12:26:49Z","updated_at":"2015-02-08T12:26:49Z","body":"Could you please show the portion of code where this SQL query is generated? If it's an escape problem it needs to be fixed in the storage module. Could you show the full log with the exception being logged?"}}