Fix sql injection in bug command

This commit is contained in:
kaenganxt
2014-12-26 21:30:47 +01:00
parent 029eab9f93
commit 8a89576a13

View File

@@ -49,7 +49,7 @@ public class Errors {
for(Entry<String, Object> date : data) {
dataText += date.getKey() + ":" + date.getValue().toString() + ";";
}
Core.getMySql().queryUpdate("INSERT INTO serverBugs(player, msg, data, timestamp) VALUES ((SELECT id FROM players WHERE uuid = '" + uuid.toString() + "'), '" + msg + "', '" + dataText + "', '" + System.currentTimeMillis() / 1000 + "')");
Core.getMySql().queryUpdate("INSERT INTO serverBugs(player, msg, data, timestamp) VALUES ((SELECT id FROM players WHERE uuid = '" + uuid.toString() + "'), '" + Core.getMySql().escapeString(msg) + "', '" + dataText + "', '" + System.currentTimeMillis() / 1000 + "')");
}
public static Entry<String, Object> make(String key, Object value) {