Add BadRequest Check for width and height on cover endpoint

This commit is contained in:
Glax 2025-03-13 21:30:05 +01:00
parent 0e68d64f75
commit 7ee4d32c07

View File

@ -115,6 +115,8 @@ public class MangaController(PgsqlContext context) : Controller
if (width is { } w && height is { } h)
{
if (width < 10 || height < 10 || width > 65535 || height > 65535)
return BadRequest();
image.Mutate(i => i.ApplyProcessor(new ResizeProcessor(new ResizeOptions()
{
Mode = ResizeMode.Max,