SQL injection fix.

Google sanitizing sql input. almost every single article explains why you should never attempt to roll your own function to do this.
This commit is contained in:
MrStonedOne
2014-08-11 20:56:10 -04:00
committed by ZomgPonies
parent e08fb5d1d0
commit c0b8e02eee
+1 -3
View File
@@ -15,9 +15,7 @@
// Run all strings to be used in an SQL query through this proc first to properly escape out injection attempts.
/proc/sanitizeSQL(var/t as text)
var/sanitized_text = replacetext(t, "'", "\\'")
sanitized_text = replacetext(sanitized_text, "\"", "\\\"")
return sanitized_text
return dbcon.Quote(t);
/*
* Text sanitization