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] - No error handling on file upload larger than max allowed size by the proxy #1532

Closed
4 tasks done
0xAnansi opened this issue Jun 23, 2023 · 0 comments · Fixed by #1675
Closed
4 tasks done

[Bug] - No error handling on file upload larger than max allowed size by the proxy #1532

0xAnansi opened this issue Jun 23, 2023 · 0 comments · Fixed by #1675
Labels
bug Something isn't working extra: critical It's really, really important

Comments

@0xAnansi
Copy link
Contributor

Requirements

  • This is a bug report, and if not, please post to https://lemmy.ml/c/lemmy_support instead.
  • Please check to see if this issue already exists.
  • It's a single bug. Do not report multiple bugs in one issue.
  • It's a frontend issue, not a backend issue; Otherwise please create an issue on the backend repo instead.

Summary

When creating a post with an image that is larger than the max client_max_body_size, the UI does not handle the http response "413 Request entity too large".

Since the request never reaches the backend, only the UI can handle it correctly.

The error displayed by the front end is a JSON parsing error since it might be the default error handling.

Steps to Reproduce

  1. Setup the instance with default settings
  2. Create a post in any community with a picture larger than 1MB (default limit)
  3. Notice the error popup in the bottom left of the screen

Changing the nginx client_max_body does not fix the underlying issue but can be set to a higher limit to mitigate this issue.

Recording 2023-06-23 at 22 50 05

Technical Details

Return of the upload is:

<html>
<head><title>413 Request Entity Too Large</title></head>
<body>
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>nginx</center>
</body>
</html>

http status is 413

Lemmy Instance Version

0.18

Lemmy Instance URL

https://jlai.lu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working extra: critical It's really, really important
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants