mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #6580] [MERGED] fix(sub): keep serverDescription literal in external link fragments #6360
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#6360
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/6580
Author: @sdhfsl
Created: 9/17/2026
Status: ✅ Merged
Merged: 9/26/2026
Merged by: @MHSanaei
Base:
main← Head:fix-external-remark-desc📝 Commits (9)
959e6fdfix(panel): accept 2FA codes from adjacent TOTP windowsf3096bbfix(panel): share TOTP skew tolerance with VerifyTwoFactorCode198ac75Merge branch 'main' into mainacb0297Merge branch 'MHSanaei:main' into main35b92a1Merge branch 'MHSanaei:main' into maina4c8c8afix(sub): keep serverDescription literal in external link fragmentsc2868a7Merge branch 'main' into fix-external-remark-descab60fcdMerge remote-tracking branch 'origin/main' into pr-6580f9a1436refactor(sub): share one serverDescription fragment split across link paths📊 Changes
3 files changed (+60 additions, -13 deletions)
View changed files
📝
internal/sub/external_config.go(+1 -1)➕
internal/sub/external_remark_test.go(+40 -0)📝
internal/sub/service.go(+19 -12)📄 Description
Problem
Fixes #6575.
Client external links (
kind: link) go throughapplyRemarkToLink, which escaped the whole remark:?serverDescription=<base64>became%3F...%2F..., so Happ no longer recognises the parameter and the subtitle disappears. Inbound/host links were already fixed for this in #6488 (appendQueryAndFragmentsplits on?serverDescription=); external rows use a different path that was missed.Fix
New
escapeRemarkFragmentmirrors the #6488 split: escape only the display name, keep a clean base64 tail literal (validated: non-empty, decodes, no spaces/newlines/#/&). Malformed tails fall back to full escaping. vmess path untouched.Tests
New
TestApplyRemarkKeepsServerDescription(issue's exact example incl. emoji) andTestApplyRemarkMalformedServerDescriptionFallsBack. Mutation-checked (split removed -> the good test fails with the exact over-escaped output from the issue, restored -> green). Fullinternal/subsuite passes,go vet+ gofmt clean.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.