Sanitize publisher name

This commit is contained in:
Joseph Milazzo 2025-04-29 11:42:33 -05:00
parent f848508801
commit 243a556fff

View file

@ -186,6 +186,8 @@ public class CoverDbService : ICoverDbService
{ {
try try
{ {
// Sanitize user input
publisherName = publisherName.Replace(Environment.NewLine, string.Empty).Replace("\r", string.Empty).Replace("\n", string.Empty);
var provider = _cacheFactory.GetCachingProvider(EasyCacheProfiles.Publisher); var provider = _cacheFactory.GetCachingProvider(EasyCacheProfiles.Publisher);
var res = await provider.GetAsync<string>(publisherName); var res = await provider.GetAsync<string>(publisherName);
if (res.HasValue) if (res.HasValue)