mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 19:11:53 +07:00
[GH-ISSUE #6680] [Bug]: The group filter isn't working. #4463
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#4463
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?
Originally created by @stormfryanovo-maker on GitHub (Sep 29, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6680
Describe the bug
When selecting the created user group in the filter, the users do not appear in the list.
How to reproduce the problem
Open the "Clients" section, press the "Filter" key, and select the previously created group containing the added users.
Expected behavior
No response
Actual behavior
No response
Relevant logs
Screenshots
No response
3x-ui version
v3.8.5
Xray-core version
v26.9.9
How did you install 3x-ui?
install.sh script
Operating system
Debian 12
Which parts of the panel are affected?
No response
Browser (only if it is a UI bug)
No response
Is the panel behind a reverse proxy or CDN?
None
Before submitting
@github-actions[bot] commented on GitHub (Sep 29, 2026):
This looks like a real bug. It is most likely what you are hitting if your group name has non-Latin letters (Cyrillic, Persian, Chinese, …) and at least one of those letters is uppercase. Since v3.6.0 the Clients page lowercases the group you pick in Go, but compares it in SQLite with
LOWER(), which only lowercases ASCII A–Z. So a name likeТестis sent to the database asтест, the storedТестstaysТест, and nothing matches. I can't view screenshots, so I have not seen your group's actual name. If it is plain Latin/ASCII, please reply with the exact name as text, because then this cause doesn't apply.Workaround until it is fixed: rename the group so it is either all-lowercase or uses only Latin letters, on the Groups page or with bulk "Add to group". Filtering by it will then work.
Verdict: Confirmed bug
Severity: Medium
Confidence: Medium (the code defect is confirmed in the source. That the reporter's group name is non-ASCII with an uppercase letter is inferred, because the name is only in the screenshots.)
Root cause:
internal/web/service/client_paging.go:266-267,clientQuery.applyParams. The requested groups are lowercased by Go's Unicode-awarestrings.ToLowerinparseCSVStrings(client_paging.go:654). The column is lowercased by SQLLOWER(), and SQLite's built-inLOWER()folds ASCII only (a documented SQLite behaviour, not something in this repo; nosqlite_icubuild tag is set anywhere inMakefile/Dockerfile/workflows). Any group name with a non-ASCII uppercase letter never matches on SQLite. PostgreSQL'sLOWER()is locale-aware, so PostgreSQL installs are likely unaffected (inferred). The bug came in withf52c3c48"perf(clients): make the clients page scale to large panels", which moved the filter from Go into SQL. The first release carrying it is v3.6.0.Already fixed: No. Still present on the default branch.
Duplicate of: None
Evidence:
client_paging.go:267:where("LOWER(TRIM(COALESCE(c.group_name, ''))) IN ?", groups)client_paging.go:654:s := strings.ToLower(strings.TrimSpace(p))f52c3c48the match was done in Go withstrings.EqualFold(g, current)in the removedclientMatchesAnyGroup, which folds Unicode correctly.client_paging_test.go:235-237("group filter is case insensitive") only uses ASCIIvip/VIP, so it can't catch this.LOWER()mismatch affects the search box (clientSearchCond,client_paging.go:116-122): searching for an email or comment with non-ASCII uppercase letters is affected too (inferred from the same pattern).Not determined: The exact group name in the report. If the name is pure ASCII, this root cause does not apply and the name as text would be needed to go further.
Suggested fix: Don't rely on SQLite
LOWER()for non-ASCII text. For example, store or compare a Go-normalised (Unicode-folded) group name, or match the group exactly and do the case-folding against the known group list in Go before building theINlist. Add a test case with a Cyrillic mixed-case group name next to the existingvip/VIPcase.This reply was generated automatically; a maintainer may follow up.
@stormfryanovo-maker commented on GitHub (Sep 29, 2026):
Yes, the group names used Cyrillic characters and uppercase letters. I renamed them, and the filter started working.