3x-ui/internal/database
MHSanaei a335456cd3 fix(settings): repair legacy path settings that block every settings save
A subJsonPath (or subPath/subClashPath/webBasePath) stored without its
leading/trailing slash — written before the slash rules existed, or
restored from an old backup — fails the frontend's whole-form validation,
so every save on the Settings page is rejected client-side. The backend's
CheckValid would normalize the value, but a save request never reaches it,
leaving the panel wedged until someone edits the database by hand.

Normalize the stored path rows at startup, mirroring CheckValid's slash
rules. The pass is idempotent and not seeder-gated, since a restored
backup can reintroduce bad values at any time.

Also add the missing pages.settings.validation.pathLeadingSlash key to
all 13 locales — the validation error used to render as its raw key.

Closes #5726
2026-07-02 13:42:03 +02:00
..
model fix(sub): bake Host VLESS Route into subscription UUIDs 2026-06-29 14:32:23 +02:00
api_token_timestamp_test.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
db.go fix(settings): repair legacy path settings that block every settings save 2026-07-02 13:42:03 +02:00
db_seed_test.go fix(settings): repair legacy path settings that block every settings save 2026-07-02 13:42:03 +02:00
db_settled_test.go fix(database): stop noisy per-startup errors in the Postgres server log 2026-07-01 23:07:05 +02:00
dialect.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
dump_sqlite.go style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
dump_sqlite_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
host_migration_test.go feat(hosts): managed Hosts for per-host subscription link overrides (#5409) 2026-06-17 12:06:55 +02:00
host_test.go feat(hosts): managed Hosts for per-host subscription link overrides (#5409) 2026-06-17 12:06:55 +02:00
index_tags_test.go fix: resolve a batch of open bug-tagged issues (traffic accounting, share strategy, sub address, CPU) (#5477) 2026-06-22 00:22:28 +02:00
migrate_data.go fix(database): stop noisy per-startup errors in the Postgres server log 2026-07-01 23:07:05 +02:00
migrate_data_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
settings_index_test.go perf(db): add an index on settings.key (#5359) 2026-06-20 15:08:54 +03:30
wireguard_migration_test.go feat(wireguard): multi-client support 2026-06-28 00:44:38 +02:00