[GH-ISSUE #2265] Can create username with spaces; Receive an error when updating a user that has a username with spaces #3351

Closed
opened 2026-03-14 07:11:04 +03:00 by kerem · 0 comments
Owner

Originally created by @NiceGuyIT on GitHub (Jul 21, 2025).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/2265

Server Info (please complete the following information):

  • OS: Ubuntu 20.04.4 LTS (Focal Fossa)
  • Browser: Firefox 128.11.0esr
  • RMM Version (as shown in top left of web UI): v1.2.0

Installation Method:

  • Standard
  • Standard with --insecure flag at install
  • Docker

Agent Info (please complete the following information):

  • Agent version (as shown in the 'Summary' tab of the agent from web UI): N/A
  • Agent OS: N/A

Describe the bug
I was able to create a user with a space in the username. After creating a role I tried to add the role to the user and received the error shown in #1820. If usernames with spaces are not allowed, the system should not allow the creation of users with spaces in the username.

To Reproduce
Steps to reproduce the behavior:

  1. Log in and go to User Administration.
  2. Create a user with a space in the username.
  3. Notice the user is created. Here is the post data.
{"is_active":true,"block_dashboard_login":false,"username":"First Last","password":"first last","email":"Test@NiceGuyIT.biz"}
  1. Edit the user and save it. Here is the post data.
{"is_active":true,"block_dashboard_login":false,"id":165,"username":"First Last","first_name":"First","last_name":"Last","email":"Test@niceguyit.biz","last_login_ip":null,"role":null,"date_format":null,"social_accounts":[]}
  1. Notice the error. Here is the response JSON.
{"username":["Enter a valid username. This value may contain only letters, numbers, and @/./+/-/_ characters."]}

Expected behavior
If the user cannot be edited with spaces in the username, the system should not allow creating a user with a space in the username.

Screenshots
See #1820.

Additional context
Issue #1820 is relevant.

Originally created by @NiceGuyIT on GitHub (Jul 21, 2025). Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/2265 **Server Info (please complete the following information):** - OS: Ubuntu 20.04.4 LTS (Focal Fossa) - Browser: Firefox 128.11.0esr - RMM Version (as shown in top left of web UI): v1.2.0 **Installation Method:** - [x] Standard - [ ] Standard with `--insecure` flag at install - [ ] Docker **Agent Info (please complete the following information):** - Agent version (as shown in the 'Summary' tab of the agent from web UI): N/A - Agent OS: N/A **Describe the bug** I was able to create a user with a space in the username. After creating a role I tried to add the role to the user and received the error shown in #1820. If usernames with spaces are not allowed, the system should not allow the creation of users with spaces in the username. **To Reproduce** Steps to reproduce the behavior: 1. Log in and go to User Administration. 2. Create a user with a space in the username. 3. Notice the user is created. Here is the post data. ```json {"is_active":true,"block_dashboard_login":false,"username":"First Last","password":"first last","email":"Test@NiceGuyIT.biz"} ``` 5. Edit the user and save it. Here is the post data. ```json {"is_active":true,"block_dashboard_login":false,"id":165,"username":"First Last","first_name":"First","last_name":"Last","email":"Test@niceguyit.biz","last_login_ip":null,"role":null,"date_format":null,"social_accounts":[]} ``` 6. Notice the error. Here is the response JSON. ```json {"username":["Enter a valid username. This value may contain only letters, numbers, and @/./+/-/_ characters."]} ``` **Expected behavior** If the user cannot be edited with spaces in the username, the system should not allow creating a user with a space in the username. **Screenshots** See #1820. **Additional context** Issue #1820 is relevant.
kerem 2026-03-14 07:11:04 +03:00
  • closed this issue
  • added the
    bug
    label
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
starred/tacticalrmm#3351
No description provided.