From 86bce00b870c9a07e630bc1c48cfcb4df5a30df3 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Mon, 22 Dec 2014 03:46:49 +0100 Subject: [PATCH] Change input sanitation method for SqlSanitize --- Database/Database-ConnectionsCommands.cs | 2 +- Database/Database-GeographyUpdates.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Database/Database-ConnectionsCommands.cs b/Database/Database-ConnectionsCommands.cs index 5529260f..bb10fb35 100644 --- a/Database/Database-ConnectionsCommands.cs +++ b/Database/Database-ConnectionsCommands.cs @@ -237,7 +237,7 @@ namespace Swarmops.Database "=" }; - string output = input.Replace ("'", "''"); // the typical case + string output = input.Replace ("'", "\\'"); // the typical case string inputLower = input.ToLowerInvariant(); foreach (string forbidden in forbiddenArray) { diff --git a/Database/Database-GeographyUpdates.cs b/Database/Database-GeographyUpdates.cs index 1bd90430..19c6539b 100644 --- a/Database/Database-GeographyUpdates.cs +++ b/Database/Database-GeographyUpdates.cs @@ -52,7 +52,7 @@ namespace Swarmops.Database DbCommand command = GetDbCommand ( - "SELECT " + geographyUpdateFieldSequence + " ORDER BY \"CreatedDateTime\"", connection); + "SELECT " + geographyUpdateFieldSequence + " ORDER BY CreatedDateTime", connection); using (DbDataReader reader = command.ExecuteReader()) {