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>
This commit is contained in:
Jamie Rees 2025-01-03 15:46:59 +00:00 committed by GitHub
commit c0422cb7fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)