Draft
Conversation
Collaborator
Pull Request Test Coverage Report for Build 23002894803Details
💛 - Coveralls |
spacebear21
reviewed
Mar 13, 2026
payjoin-mailroom/src/lib.rs
Outdated
| .layer(axum::middleware::from_fn_with_state(metrics.clone(), track_metrics)) | ||
| .layer(axum::middleware::from_fn_with_state(metrics, track_connections)), | ||
| .layer(axum::middleware::from_fn_with_state(metrics, track_connections)) | ||
| .layer(RequestBodyLimitLayer::new(65_536)), |
Collaborator
There was a problem hiding this comment.
This value should be in a named constant. Also, a relevant PR we may want to revisit now: #1025
This pr addresses payjoin#941, it implements a body size limit layer to reject request whose size is greater than 7168. This also ensures both v1 and v2 have the same request size which makes it hard for an attacker to tell if a request is v1/v2 baed on payload.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pr addresses #941, it implements a body size limit layer to reject request whose size is greater than 65536 bytes.
Pull Request Checklist
Please confirm the following before requesting review:
AI
in the body of this PR.