Merge pull request #6044 from Mloc/bs12

security
This commit is contained in:
Zuhayr
2014-08-18 22:37:11 +09:30
+2 -3
View File
@@ -15,9 +15,8 @@
// 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
var/sqltext = dbcon.Quote(t);
return copytext(sqltext, 2, lentext(sqltext)-1);//Quote() adds quotes around input, we already do that
/*
* Text sanitization