From 873c15178cfed20e58a54ead0a45dc0da88a0af2 Mon Sep 17 00:00:00 2001 From: MrStonedOne Date: Fri, 8 Aug 2014 22:32:56 -0700 Subject: [PATCH] Fixes sql errors caused by odd and unexpected behavor in dbcon.Quote() --- code/__HELPERS/text.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index adee6bb7c89..15d93b5563f 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -15,7 +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) - return dbcon.Quote(t); + var/sqltext = dbcon.Quote(t); + return copytext(sqltext, 2, lentext(sqltext)-1);//Quote() adds quotes around input, we already do that /* * Text sanitization