mirror of
https://github.com/matze/wastebin.git
synced 2026-04-26 00:55:59 +03:00
[PR #94] [CLOSED] Enforce paste content size limit #160
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/wastebin-matze#160
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/matze/wastebin/pull/94
Author: @cgzones
Created: 1/18/2025
Status: ❌ Closed
Base:
master← Head:body_length📝 Commits (1)
23e7189Enforce paste content size limit📊 Changes
4 files changed (+29 additions, -7 deletions)
View changed files
📝
src/errors.rs(+6 -0)📝
src/main.rs(+2 -0)📝
src/routes/paste.rs(+20 -7)📝
src/test_helpers.rs(+1 -0)📄 Description
Since commit
7cd3924c("Use ServiceBuilder to layer middleware") the request body size is no longer enforced via the WASTEBIN_MAX_BODY_SIZE environment variable.Reintroduce that enforcement.
Also tweak error propagation in the insert() handler to show nice formatted error sites instead of blank pages.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.