[PR #6685] [MERGED] Fix clients group filter and search for non-ASCII capitals #6409

Closed
opened 2026-11-02 04:08:33 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/6685
Author: @freeb5d
Created: 9/29/2026
Status: ✅ Merged
Merged: 10/2/2026
Merged by: @MHSanaei

Base: main ← Head: fix/clients-filter-unicode-case


📝 Commits (2)

  • a50deca Match non-ASCII capitals in the clients group filter and search
  • 2b70c7f Match lower, upper and title-case spellings for non-ASCII search and group filter

📊 Changes

2 files changed (+93 additions, -11 deletions)

View changed files

📝 internal/web/service/client_paging.go (+60 -11)
📝 internal/web/service/client_paging_test.go (+33 -0)

📄 Description

Fixes #6680

Problem

The Clients page lower-cases the group and search term in Go (Unicode-aware) but compares them with SQLite LOWER(), which only folds ASCII. A group such as Тест is sent as тест and never matches the stored Тест. Search has the same mismatch.

Change

  • Group filter also matches the trimmed value as typed (... IN lowered OR ... IN raw).
  • Search matches each text column both lower-cased and as typed.
  • ASCII behaviour is unchanged; no schema change.
  • Test: TestListPagedNonASCIICase (Cyrillic group and comment).

Limitation

Matching uses the lower, as-typed, upper and title-case spellings of the term, so common casings match. Odd mixed-case spellings (e.g. пРИвет stored as such) can still miss on SQLite.

Testing

Not run: my environment has no C compiler for the SQLite driver. Files are gofmt-clean. Please rely on CI.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/6685 **Author:** [@freeb5d](https://github.com/freeb5d) **Created:** 9/29/2026 **Status:** ✅ Merged **Merged:** 10/2/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `fix/clients-filter-unicode-case` --- ### 📝 Commits (2) - [`a50deca`](https://github.com/MHSanaei/3x-ui/commit/a50decab98be63568616e4ec0bd7ef7326fb898a) Match non-ASCII capitals in the clients group filter and search - [`2b70c7f`](https://github.com/MHSanaei/3x-ui/commit/2b70c7f28ae73a38460bdc9ba103fe75b0cda395) Match lower, upper and title-case spellings for non-ASCII search and group filter ### 📊 Changes **2 files changed** (+93 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `internal/web/service/client_paging.go` (+60 -11) 📝 `internal/web/service/client_paging_test.go` (+33 -0) </details> ### 📄 Description Fixes #6680 ## Problem The Clients page lower-cases the group and search term in Go (Unicode-aware) but compares them with SQLite `LOWER()`, which only folds ASCII. A group such as `Тест` is sent as `тест` and never matches the stored `Тест`. Search has the same mismatch. ## Change - Group filter also matches the trimmed value as typed (`... IN lowered OR ... IN raw`). - Search matches each text column both lower-cased and as typed. - ASCII behaviour is unchanged; no schema change. - Test: `TestListPagedNonASCIICase` (Cyrillic group and comment). ## Limitation Matching uses the lower, as-typed, upper and title-case spellings of the term, so common casings match. Odd mixed-case spellings (e.g. пРИвет stored as such) can still miss on SQLite. ## Testing Not run: my environment has no C compiler for the SQLite driver. Files are gofmt-clean. Please rely on CI. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:08:33 +07:00
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#6409
No description provided.