mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user