From dbccc86fd73247cd68fa0e0ca77dadd2673562a6 Mon Sep 17 00:00:00 2001 From: Alex Macocian Date: Tue, 28 Nov 2023 00:42:29 +0100 Subject: [PATCH] Sanitize parition key search --- GuildWarsPartySearch/Services/Database/TableStorageDatabase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GuildWarsPartySearch/Services/Database/TableStorageDatabase.cs b/GuildWarsPartySearch/Services/Database/TableStorageDatabase.cs index 2ef3110..e21363c 100644 --- a/GuildWarsPartySearch/Services/Database/TableStorageDatabase.cs +++ b/GuildWarsPartySearch/Services/Database/TableStorageDatabase.cs @@ -121,7 +121,7 @@ public TableStorageDatabase( var scopedLogger = this.logger.CreateScopedLogger(nameof(this.GetPartySearches), partitionKey); try { - var response = await this.QuerySearches($"PartitionKey eq '{partitionKey}'", cancellationToken); + var response = await this.QuerySearches($"PartitionKey eq '{partitionKey.Replace("'", "''")}'", cancellationToken); var partition = response.FirstOrDefault(); if (partition is null) {