mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #5970] [MERGED] Repo-wide self-correcting audit: 54 verified bug fixes #6043
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#6043
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?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/5970
Author: @MHSanaei
Created: 7/15/2026
Status: ✅ Merged
Merged: 7/16/2026
Merged by: @MHSanaei
Base:
main← Head:audit/self-correcting-review📝 Commits (10+)
97dd724fix(email): resolve a name-addr smtpFrom into bare envelope address and display name9ffbeb4fix(email): report a missing sender address from the SMTP connection test52442cbfix(sub): fall back to the raw subscription when an auto-detected format has no content448e8c9fix(node): match prefixed central tags when filtering a selected-mode node snapshot7b266a9fix(client): refuse a bulk quota reduction that would fall to or below zeroe4ef8a5fix(client): persist a bulk adjustment's applied field even when the sibling field is skipped091dbc0fix(inbound): always create in AddInbound instead of overwriting a row whose id was posteda77c365fix(inbound): accept WireGuard clients when creating an inboundade3a8ffix(client): stop holding the inbound-lock registry mutex while waiting on one inbound0bbcd2afix(client): honor keepTraffic when deleting a client that is attached to inbounds📊 Changes
102 files changed (+2733 additions, -395 deletions)
View changed files
📝
frontend/src/api/http-init.ts(+5 -2)📝
frontend/src/api/websocket.ts(+9 -0)📝
frontend/src/api/websocketBridge.ts(+3 -17)📝
frontend/src/components/clients/ConfigBlock.css(+1 -0)📝
frontend/src/hooks/useWebSocket.ts(+2 -17)📝
frontend/src/lib/xray/forms/fields/SniffingField.tsx(+11 -3)📝
frontend/src/pages/clients/ClientFormModal.tsx(+10 -2)📝
frontend/src/pages/nodes/NodeList.tsx(+1 -1)📝
frontend/src/pages/xray/basics/BasicsTab.tsx(+2 -1)📝
frontend/src/pages/xray/outbounds/OutboundCardList.tsx(+9 -9)📝
frontend/src/pages/xray/outbounds/OutboundsTab.tsx(+21 -10)📝
frontend/src/pages/xray/outbounds/outbounds-tab-helpers.ts(+13 -0)📝
frontend/src/pages/xray/outbounds/useOutboundColumns.tsx(+11 -11)📝
frontend/src/pages/xray/routing/RoutingTab.tsx(+24 -12)📝
frontend/src/pages/xray/routing/RuleFormModal.tsx(+6 -0)📝
frontend/src/pages/xray/routing/helpers.ts(+12 -0)➕
frontend/src/test/basics-happy-eyeballs.test.tsx(+36 -0)➕
frontend/src/test/client-total-bytes.test.tsx(+20 -0)📝
frontend/src/test/http-init-msw.test.ts(+29 -0)📝
frontend/src/test/httpUtil.test.ts(+2 -2)...and 80 more files
📄 Description
What this is
A repo-wide, self-correcting code audit run in prioritized batches (high-risk backend → rest of backend → frontend → shell scripts → final adversarial re-review). Each batch scanned the code, confirmed every finding by re-reading the cited region, then landed one focused fix + one regression test per confirmed bug, each as its own conventional commit.
54 commits, every fix red/green verified (the test fails before the fix, passes after).
Verification
go build ./...,go vet ./..., all packages pass (includinginternal/web/service/...andinternal/eventbusunder-race).tsc --noEmit, 792 Vitest tests (70 files),vite build— no generated-file drift.Highlights
Critical (P1)
isAdminguard, exposing DB backup / traffic reset / add-client to any caller — added default-deny._bl_*) row preceded a visible one, edit/delete/probe hit the wrong entry. Fixed on both desktop and mobile paths via an explicit positional→real index mapping.Notable (P2)
<meta>token instead of refetching; now pulls a fresh token from/csrf-token.happyEyeballsvalue white-screened the Basics tab (parse→safeParse); editing a routing rule dropped fields the form doesn't surface; the Sniffing island didn't re-sync to external (advanced-JSON) edits.data.messagevs the backend'smsg); node table used duplicate React keys for transitive sub-nodes; a double WebSocket connection was opened per page.Adversarial re-review: the five riskiest fixes were independently re-reviewed; it caught an incomplete outbounds fix (mobile card list) and a regression in the first eventbus attempt — both fixed and re-verified in this branch.
Not included (need maintainer input)
x-ui.sh,install.sh,DockerInit.sh,update.sh): 23 findings were identified but not committed — they are Linux/Docker-only and unverifiable on the audit host (nobash -n/shellcheck/Docker), and touch the live install/update path. They should be reviewed and applied on Linux as a separate PR. The most serious (P2): non-TTY panel-triggered update can spin in an infinitereadloop on a filtered host; an unattended update can auto-issue an SSL cert; the fail2ban SSH-port exemption can fall back to port 22 on busybox/Debian-12;DockerInit.shlacksset -e; Docker arch labels don't matchTARGETARCH.One open decision
MergeClientRecordtreats0(unlimited / never-expire) as the smallest value, so merging duplicate-email clients during migration can downgrade unlimited→limited or set a past expiry. The past-expiry case looks wrong, but the general merge policy is a judgment call on migration behavior — left for maintainer decision before changing it.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.