3x-ui/internal/web
Sanaei 2a8c3bc0db fix(clients): stop a stale IP row from blocking a client edit
Saving a client walks every inbound it is attached to and calls
UpdateInboundClient, which re-keys the client's email in inbound_client_ips
to the spelling in the edited settings. The email match is EqualFold, so when
an inbound's settings JSON drifted in case from the client record the panel
issues a case-only rename of the tracking row.

inbound_client_ips.client_email is unique and case-sensitive, and the
IP-limit job keys its rows on whatever casing Xray reports, so both spellings
can already be present. The rename then aborts the whole edit with
"duplicate key value violates unique constraint
uni_inbound_client_ips_client_email" — the client could not be saved at all,
including when only adding an inbound to it.

The caller only renames onto an identity no live client holds, so a row on
the target email is stale IP tracking: delete it before renaming. The blob is
rebuilt by the next scan anyway.
2026-08-02 12:32:45 +02:00
..
controller fix dead code, typo, and minor bugs in main.go, process.go and index.go (#6167) 2026-07-31 18:27:46 +02:00
entity feat(sub): allow identity tokens on every subscription link (#5935) 2026-07-28 22:12:52 +02:00
global refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
job fix(node): stop the node sync from deleting clients it never meant to 2026-08-01 15:19:08 +02:00
locale style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
middleware fix(web): tighten database restore body-cap exemption (#5609) 2026-06-28 15:00:55 +02:00
network style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
runtime inbounds: allow custom monthly traffic reset days (#6071) 2026-07-28 23:27:09 +02:00
service fix(clients): stop a stale IP row from blocking a client edit 2026-08-02 12:32:45 +02:00
session refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
translation feat(ui): let users pin the sidebar 2026-07-30 14:39:55 +08:00
websocket fix(nodes): keep the credential-presence flag on the node heartbeat push 2026-07-28 17:38:46 +02:00
cadence_test.go refactor(web): centralize background job cadences (#5269) 2026-06-14 22:50:24 +02:00
routes_contract_test.go fix(api): authenticate GET /panel/api/openapi.json + pin the route registry to the router (#6133) 2026-07-29 08:00:05 +02:00
web.go fix(node): stop the node sync from deleting clients it never meant to 2026-08-01 15:19:08 +02:00
web_mtls.go feat(node): node hardening — mTLS, hashed+zstd reconcile transport, per-node net metrics (#5382) 2026-06-16 12:19:33 +02:00
web_mtls_test.go feat(node): node hardening — mTLS, hashed+zstd reconcile transport, per-node net metrics (#5382) 2026-06-16 12:19:33 +02:00