[GH-ISSUE #4695] [Bug]: Email with slash character breaks API and Web UI (404 error) #3244

Closed
opened 2026-10-31 20:31:05 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Necroflex1 on GitHub (May 30, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4695

Describe the bug

When a client's email address contains a slash character (/), the 3x-ui panel's web interface and API endpoints for that client return an HTTP 404 error. This makes it impossible to manage (edit, delete, or view) the affected client through the UI. The issue was first encountered in a multi-node setup.

How to reproduce the problem

  1. Log in to the 3x-ui web panel.
  2. Go to the Inbounds page and open any inbound configuration.
  3. Add a new client and set its Email field to a string containing a slash, such as R/R or test/test.
  4. Click Save to create the client.
  5. Locate the newly created client in the list and try to perform any action on it (e.g., click the Edit or Delete button).
  6. Observe the outcome.

Expected behavior

The panel should handle the email address correctly, and all management actions (edit, delete, view) should work without errors. Alternatively, the panel should prevent the creation of an email address with invalid characters (such as /) and display a clear error message to the user.

Actual behavior

  • The client appears in the list, but any attempt to edit or delete it results in a browser console error and an HTTP 404 response from the backend API.
  • The client's configuration cannot be modified or removed through the web interface.
  • This creates a stale database entry that can only be cleaned up via manual SQLite commands.

Relevant logs


Screenshots

No response

3x-ui version

3.2.0

Xray-core version

26.5.9

How did you install 3x-ui?

install.sh script

Operating system

ubuntu 20.04 lts

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?

No — direct access

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 @Necroflex1 on GitHub (May 30, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4695 ### Describe the bug When a client's email address contains a slash character (`/`), the 3x-ui panel's web interface and API endpoints for that client return an HTTP 404 error. This makes it impossible to manage (edit, delete, or view) the affected client through the UI. The issue was first encountered in a multi-node setup. ### How to reproduce the problem 1. Log in to the 3x-ui web panel. 2. Go to the **Inbounds** page and open any inbound configuration. 3. Add a new client and set its **Email** field to a string containing a slash, such as `R/R` or `test/test`. 4. Click **Save** to create the client. 5. Locate the newly created client in the list and try to perform any action on it (e.g., click the **Edit** or **Delete** button). 6. Observe the outcome. ### Expected behavior The panel should handle the email address correctly, and all management actions (edit, delete, view) should work without errors. Alternatively, the panel should prevent the creation of an email address with invalid characters (such as `/`) and display a clear error message to the user. ### Actual behavior - The client appears in the list, but any attempt to edit or delete it results in a browser console error and an HTTP 404 response from the backend API. - The client's configuration cannot be modified or removed through the web interface. - This creates a stale database entry that can only be cleaned up via manual SQLite commands. ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.2.0 ### Xray-core version 26.5.9 ### How did you install 3x-ui? install.sh script ### Operating system ubuntu 20.04 lts ### 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? No — direct access ### 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:31:05 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@MHSanaei commented on GitHub (May 30, 2026):

Resolved via the prevention approach suggested in the issue: client emails are now validated and reject '/', '', spaces, and control characters, with a clear localized error shown at save time.

Validation runs on both layers:

  • Backend: validateClientEmail in web/service/client.go, called from Create and Update (so the bulk-create/update paths and direct API callers are covered too).
  • Frontend: a Zod refine in frontend/src/schemas/client.ts blocks the save before the request is sent.

The error message was translated across all 13 locales.

Note for anyone with an already-stuck client (created before this fix): it can be removed from the panel via multi-select then Delete, since the bulk-delete endpoint sends the email in the request body rather than in the URL path.

<!-- gh-comment-id:4584607474 --> @MHSanaei commented on GitHub (May 30, 2026): Resolved via the prevention approach suggested in the issue: client emails are now validated and reject '/', '\', spaces, and control characters, with a clear localized error shown at save time. Validation runs on both layers: - Backend: validateClientEmail in web/service/client.go, called from Create and Update (so the bulk-create/update paths and direct API callers are covered too). - Frontend: a Zod refine in frontend/src/schemas/client.ts blocks the save before the request is sent. The error message was translated across all 13 locales. Note for anyone with an already-stuck client (created before this fix): it can be removed from the panel via multi-select then Delete, since the bulk-delete endpoint sends the email in the request body rather than in the URL path.
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#3244
No description provided.