mirror of
https://github.com/C9Glax/tranga.git
synced 2025-04-13 03:43:17 +02:00
Add BadRequest Check for width and height on cover endpoint
This commit is contained in:
parent
0e68d64f75
commit
7ee4d32c07
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user