Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

fix: return 404 for image requests with invalid id/size (#626)

Guilherme Oenning013019445490
diff --git a/app/handlers/images.go b/app/handlers/images.go
index 948f00fad..4b6b086e7 100644
--- a/app/handlers/images.go
+++ b/app/handlers/images.go
@@ -68,12 +68,12 @@ func ViewUploadedImage() web.HandlerFunc {
return func(c web.Context) error {
id, err := c.ParamAsInt("id")
if err != nil {
- return c.Failure(err)
+ return c.NotFound()
}
size, err := c.ParamAsInt("size")
if err != nil {
- return c.Failure(err)
+ return c.NotFound()
}
logo, err := c.Services().Tenants.GetUpload(id)