[GH-ISSUE #6680] [Bug]: The group filter isn't working. #4463

Closed
opened 2026-10-31 20:39:50 +07:00 by bsakaguchi · 2 comments
Owner

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.

Image Image

How to reproduce the problem

Open the "Clients" section, press the "Filter" key, and select the previously created group containing the added users.

Image

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

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
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. <img width="1894" height="726" alt="Image" src="https://github.com/user-attachments/assets/6ec2d1df-1c9e-4367-a779-f02543271e0b" /> <img width="1880" height="338" alt="Image" src="https://github.com/user-attachments/assets/bbf804eb-d3c8-426c-8748-dd230c3828e0" /> ### How to reproduce the problem Open the "Clients" section, press the "Filter" key, and select the previously created group containing the added users. <img width="1994" height="947" alt="Image" src="https://github.com/user-attachments/assets/461283a1-2a8a-4d94-bbbf-cbb252cb5290" /> ### Expected behavior _No response_ ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### 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 - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
bsakaguchi 2026-10-31 20:39:50 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@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-aware strings.ToLower in parseCSVStrings (client_paging.go:654). The column is lowercased by SQL LOWER(), and SQLite's built-in LOWER() folds ASCII only (a documented SQLite behaviour, not something in this repo; no sqlite_icu build tag is set anywhere in Makefile/Dockerfile/workflows). Any group name with a non-ASCII uppercase letter never matches on SQLite. PostgreSQL's LOWER() is locale-aware, so PostgreSQL installs are likely unaffected (inferred). The bug came in with f52c3c48 "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))
  • Before f52c3c48 the match was done in Go with strings.EqualFold(g, current) in the removed clientMatchesAnyGroup, which folds Unicode correctly.
  • client_paging_test.go:235-237 ("group filter is case insensitive") only uses ASCII vip/VIP, so it can't catch this.
  • The same Go-lowercase-vs-SQLite-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 the IN list. Add a test case with a Cyrillic mixed-case group name next to the existing vip/VIP case.

This reply was generated automatically; a maintainer may follow up.

<!-- gh-comment-id:5891258749 --> @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-aware `strings.ToLower` in `parseCSVStrings` (`client_paging.go:654`). The column is lowercased by SQL `LOWER()`, and SQLite's built-in `LOWER()` folds ASCII only (a documented SQLite behaviour, not something in this repo; no `sqlite_icu` build tag is set anywhere in `Makefile`/`Dockerfile`/workflows). Any group name with a non-ASCII uppercase letter never matches on SQLite. PostgreSQL's `LOWER()` is locale-aware, so PostgreSQL installs are likely unaffected (inferred). The bug came in with f52c3c48 "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))` - Before f52c3c48 the match was done in Go with `strings.EqualFold(g, current)` in the removed `clientMatchesAnyGroup`, which folds Unicode correctly. - `client_paging_test.go:235-237` ("group filter is case insensitive") only uses ASCII `vip`/`VIP`, so it can't catch this. - The same Go-lowercase-vs-SQLite-`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 the `IN` list. Add a test case with a Cyrillic mixed-case group name next to the existing `vip`/`VIP` case. _This reply was generated automatically; a maintainer may follow up._ <!-- claude-issue:analyst -->
Author
Owner

@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.

<!-- gh-comment-id:5891451182 --> @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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#4463
No description provided.