Don't send overly large request from Frontend
- Dominant language
- JavaScript
- Stars
- 226
- Forks
- 235
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 19
Description
Before sending a file, Frontend [checks](https://github.com/getodk/central-frontend/blob/44de56877c2f7f49b225c5b65a56f7fe4d103bbb/src/composables/request.js#L90-L94) that the file doesn't exceed the nginx limit of 100 MB. However, Frontend only checks that for files, not other request bodies, so it's possible for other large requests to be sent, resulting in a 413 error. Instead, it'd be better for Frontend to check all request bodies before sending them. (Though I'm not quite sure how to implement that. Can we access the `Content-Length` header somehow?)
This issue is marked as "blocked", because we don't want to make this change until #609 is resolved. For now, we're taking the approach described in #610: allowing the request to be sent, but showing an informative error message. However, once #609 is resolved, it'd be good to prevent the request from being sent in the first place.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.