From 5a1f1429bc4e6d8d85a90f5837f6275ffebc3302 Mon Sep 17 00:00:00 2001 From: Kyle Spier-Swenson Date: Mon, 27 Feb 2017 02:28:37 -0800 Subject: [PATCH] Patches around byond bug ID:2218538 (sql quote acting odd) --- code/__HELPERS/text.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index 9edfa40de0c..a01887727c1 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -14,8 +14,8 @@ */ // Run all strings to be used in an SQL query through this proc first to properly escape out injection attempts. -/proc/sanitizeSQL(t as text) - var/sqltext = dbcon.Quote(t); +/proc/sanitizeSQL(t) + var/sqltext = dbcon.Quote("[t]"); return copytext(sqltext, 2, lentext(sqltext));//Quote() adds quotes around input, we already do that /proc/format_table_name(table as text) @@ -553,4 +553,4 @@ var/list/binary = list("0","1") var/list/tosend = list() tosend["data"] = finalized - log << json_encode(tosend) \ No newline at end of file + log << json_encode(tosend)