mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
TG: More SQL injection patches. Added a standardized method of SQL sanitization
[sanitizeSQL()]. Corrected a href list vulnerability that let players spawn Arcane Tomes from non-e-magged library computers. Tweaked and disabled forum_activation.dm. Way too many SQL vulnerabilities to justify keeping it around. Revision: r3012 Author: only.lurking
This commit is contained in:
@@ -50,6 +50,12 @@
|
||||
// - Books shouldn't print straight from the library computer. Make it synch with a machine like the book binder to print instead. This should consume some sort of resource.
|
||||
|
||||
|
||||
// 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 = dd_replacetext(t, "'", "\\'")
|
||||
sanitized_text = dd_replacetext(sanitized_text, "\"", "\\\"")
|
||||
return sanitized_text
|
||||
|
||||
|
||||
|
||||
/obj/structure/bookcase
|
||||
|
||||
Reference in New Issue
Block a user