mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6538] [MERGED] fix(sub): prevent default profile page URL disclosure #6338
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#6338
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/6538
Author: @NgaiYeanCoi
Created: 9/15/2026
Status: ✅ Merged
Merged: 9/15/2026
Merged by: @MHSanaei
Base:
main← Head:fix/happ-profile-url-leak📝 Commits (3)
ba32cd2fix(sub): prevent default profile page URL disclosuree734262fix(subscription): add profile page link options and upgrade notesa5ea8f3Merge branch 'main' into fix/happ-profile-url-leak📊 Changes
36 files changed (+747 additions, -47 deletions)
View changed files
📝
docs/content/docs/en/config/subscription.mdx(+19 -0)📝
docs/content/docs/fa/config/subscription.mdx(+17 -0)📝
docs/content/docs/ru/config/subscription.mdx(+18 -0)📝
docs/content/docs/zh/config/subscription.mdx(+12 -0)📝
docs/public/openapi.json(+8 -0)📝
frontend/public/openapi.json(+8 -0)📝
frontend/src/generated/examples.ts(+2 -0)📝
frontend/src/generated/schemas.ts(+8 -0)📝
frontend/src/generated/types.ts(+2 -0)📝
frontend/src/generated/zod.ts(+2 -0)📝
frontend/src/models/setting.ts(+11 -0)📝
frontend/src/pages/settings/SubscriptionGeneralTab.tsx(+37 -8)📝
frontend/src/schemas/setting.ts(+4 -0)➕
frontend/src/test/setting-profile-mode.test.ts(+36 -0)📝
frontend/src/test/subscription-general-tab.test.tsx(+74 -1)📝
internal/sub/controller.go(+16 -6)📝
internal/sub/placeholders.go(+12 -8)📝
internal/sub/placeholders_test.go(+72 -11)➕
internal/sub/profile_mode_test.go(+97 -0)📝
internal/sub/sub.go(+5 -0)...and 16 more files
📄 Description
Summary
Add explicit profile page modes: No link (default), Built-in subscription page, and Custom website. Preserve existing custom URLs during upgrades and when switching modes.
Why
Currently, an empty profile URL previously fell back to the subscription request URL in
Profile-Web-Page-Url. This exposed a route to plaintext subscription URLs and node configurations, including for subscriptions imported through Happ encrypted links. It would violate Happ encrypt generator implemented original purpose.The built-in page remains available through an explicit selection, with a warning explaining what it exposes. These settings apply to all subscription clients.
Type of change
Areas affected
How was this tested?
Screenshots / recordings
Breaking changes
Previously empty profile URL settings now omit the website link instead of automatically exposing the built-in subscription page.
To restore the previous feature, select Built-in subscription page in subscription settings. Existing nonempty custom URLs remain active. An empty custom URL sends no link.
No database schema migration is required.
Checklist
go build ./...and the test suite pass locally.npm run lint,npm run typecheck, andnpm run buildpass.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.