From c0422cb7fa77d9bf0a7384c2a1fc0ce7f99ff460 Mon Sep 17 00:00:00 2001 From: Jamie Rees Date: Fri, 3 Jan 2025 15:46:59 +0000 Subject: [PATCH] Fix code scanning alert no. 238: Log entries created from user input Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- src/Ombi/Controllers/V2/WizardController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Ombi/Controllers/V2/WizardController.cs b/src/Ombi/Controllers/V2/WizardController.cs index 07f3d82cc..2b3ab4f62 100644 --- a/src/Ombi/Controllers/V2/WizardController.cs +++ b/src/Ombi/Controllers/V2/WizardController.cs @@ -90,7 +90,8 @@ namespace Ombi.Controllers.V2 return BadRequest(); } - _logger.LogInformation("Setting up database type: {0}", config.Type); + var sanitizedType = config.Type.Replace(Environment.NewLine, "").Replace("\n", "").Replace("\r", ""); + _logger.LogInformation("Setting up database type: {0}", sanitizedType); var connectionString = string.Empty; if (config.Type == IDatabaseConfigurationService.MySqlDatabase)