PR-6.1-dev Pending

User tests: Successful: Unsuccessful:

avatar aboarken
aboarken
27 Sep 2026

Pull Request resolves #48507

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

Updated the username validation in libraries/src/Table/User.php to reject whitespace characters anywhere in the username.

Previously, Joomla could accept usernames containing spaces, such as Ahmad Moussa. The validation now also checks for whitespace between characters, while keeping the existing validation for leading and trailing whitespace.

Examples:
"AhmadMoussa" → accepted
"Ahmad Moussa" → rejected
" AhmadMoussa" → rejected
"AhmadMoussa " → rejected

Testing Instructions

Create or edit a Joomla user and test the following usernames:

"AhmadMoussa"
"Ahmad Moussa"
" AhmadMoussa"
"AhmadMoussa "

Verify that usernames without whitespace are accepted and usernames containing whitespace are rejected.

Actual result BEFORE applying this Pull Request

Joomla allowed usernames containing spaces between words, such as "Ahmad Moussa".

Expected result AFTER applying this Pull Request

Joomla rejects usernames containing whitespace characters, including spaces between words and leading or trailing whitespace.

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:
  • No documentation changes for guide.joomla.org needed
  • Pull Request link for manual.joomla.org:
  • No documentation changes for manual.joomla.org needed
avatar aboarken aboarken - open - 27 Sep 2026
avatar aboarken aboarken - change - 27 Sep 2026
Status New ⇒ Pending
avatar joomla-cms-bot joomla-cms-bot - change - 27 Sep 2026
Category ⇒ Libraries
avatar aboarken
aboarken - comment - 27 Sep 2026

Hello @alikon, thank you again for your patience and please check my second pull request 👍

avatar alikon
alikon - comment - 28 Sep 2026

@aboarken looks good
i'll find some time to test
thank you

avatar alikon
alikon - comment - 28 Sep 2026

from backed and frontend works as expected
from cli check aboarken#1

avatar aboarken
aboarken - comment - 28 Sep 2026

from backed and frontend works as expected from cli check aboarken#1

Thank you @alikon.

avatar aboarken aboarken - change - 28 Sep 2026
Labels Added: PR-6.1-dev
avatar alikon alikon - test_item - 30 Sep 2026 - Tested successfully
avatar alikon
alikon - comment - 30 Sep 2026

I have tested this item ✅ successfully on d8a788b


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48515.

avatar alikon
alikon - comment - 30 Sep 2026

I have tested this item ✅ successfully on d8a788b


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48515.

Add a Comment

Login with GitHub to post a comment