mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[PR #4423] [CLOSED] fix(inbounds): prevent search from matching raw JSON field names in settings/streamSettings #5684
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#5684
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/4423
Author: @abdalrahmanx9
Created: 5/16/2026
Status: ❌ Closed
Base:
main← Head:fix/inbound-search-json-keys📝 Commits (1)
5457194fix(inbounds): prevent search from matching raw JSON field names in settings/streamSettings📊 Changes
1 file changed (+17 additions, -6 deletions)
View changed files
📝
frontend/src/pages/inbounds/InboundList.vue(+17 -6)📄 Description
Summary
The inbound search uses deepSearch() on the entire DBInbound object, which includes raw JSON strings (settings, streamSettings, sniffing). The function searches these as plain text, so internal JSON property names like
"echForceQuery"case-insensitively match search terms like "for", causing unrelated inbounds to appear in results. When those inbounds are expanded, they show empty clients because no client matches the search term.Root Cause
deepSearch(dbInbound, searchKey)in InboundList.vue recursively traverses all properties including streamSettings (a raw JSON string)."echForceQuery"containsForwhich lowercases tofor, producing a false positive.Fix
Replace the inbound-level
deepSearchwith targeted field checks:remark,tag,listen,protocol,portsettings.clientsJSON (email, UUID, comment, subId, etc.)settings,streamSettings,sniffing)When a client match is found only matching clients are shown. When the match is in inbound metadata only, all clients are shown.
Before
Searching "for" shows inbounds with
echForceQueryin their streamSettings — expanded with zero clients.After
Searching "for" shows only inbounds whose metadata or clients actually contain "for".
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.