Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Do not log 404 error on recipe with no image #4804

Open
6 tasks done
Cereal916 opened this issue Dec 31, 2024 · 0 comments
Open
6 tasks done

[BUG] - Do not log 404 error on recipe with no image #4804

Cereal916 opened this issue Dec 31, 2024 · 0 comments
Labels
bug: confirmed bug Something isn't working

Comments

@Cereal916
Copy link

First Check

  • This is not a feature request.
  • I added a very descriptive title to this issue (title field is above this).
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the Mealie documentation, with the integrated search.
  • I already read the docs and didn't find an answer.
  • This issue can be replicated on the demo site (https://demo.mealie.io/).

What is the issue you are experiencing?

Recipes that genuinely have no cover image are resulting in a 404 error in the logs. This results in a false positive in some of my security tools, banning the users ip address from communication with my server.

Expected:

  • If the recipe contains no image, there should be no request to retrieve the "min-original.webp" image.
    OR
  • the API should recognize that the recipe has no image, and return an http 200 code with an empty body.

Steps to Reproduce

  1. Open the chrome dev tools so you can see the full network log when the error is thrown.
  2. Create a recipe manually, and do not attach an image.
  3. Go to the recipes page. You will see all of your recipes including those without images
  4. a call to the api is made "/api/media/recipes/4d647a74-bad9-476e-8a3d-ad132a13406e/images/min-original.webp?rnd=1&version=" and a 404 is returned and logged.

Please provide relevant logs

Log in Chrome browser from demo site
GET https://demo.mealie.io/api/media/recipes/631d6769-9e8b-4199-83c0-ddf7eaafa086/images/min-original.webp?rnd=1&version=jL92 404 (Not Found)

NGINX logs in proxy-host-*access.log
[31/Dec/2024:03:47:58 +0000] - 404 404 - GET https xxxx.xxxx.com "/api/media/recipes/4d647a74-bad9-476e-8a3d-ad132a13406e/images/min-original.webp?rnd=1&version=" [Client xxx.xx.xxx.xxx] [Length 22] [Gzip -] [Sent-to xxx.xx.x.x] "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Mobile Safari/537.36" "https://xxxx.xxxxx.com/g/xxxxx"

Mealie Version

Version
v2.4.1

Build
2922782e5ea44e1c5d2690c9aea84134a044a7cc

Deployment

Docker (Linux)

Additional Deployment Details

No response

@Cereal916 Cereal916 added bug Something isn't working triage labels Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: confirmed bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants