mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #5493] [MERGED] fix(subscription): bound outbound subscription response body #5901
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#5901
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/MHSanaei/3x-ui/pull/5493
Author: @n0ctal
Created: 6/22/2026
Status: ✅ Merged
Merged: 6/23/2026
Merged by: @MHSanaei
Base:
main← Head:pr-0013-bound-outbound-sub📝 Commits (1)
f1de820fix(subscription): bound outbound response body📊 Changes
2 files changed (+46 additions, -1 deletions)
View changed files
📝
internal/web/service/outbound_subscription.go(+20 -1)📝
internal/web/service/outbound_subscription_test.go(+26 -0)📄 Description
The outbound subscription handler reads the upstream response fully into memory before serving it. A large or slow upstream (or a malicious one) can therefore grow panel memory without bound.
This wraps the read in an
io.LimitReaderwith an explicit cap and returns a clear error when the response exceeds it, mirroring the request-body bounding already applied to state-changing routes. Behavior is unchanged for normal-sized responses.Adds a focused test for the overflow and under-limit paths.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.