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-08 00:15:33 -07:00
committed by Mloc-Argent
parent f9a07a16ef
commit f396b94068

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