User tests: Successful: Unsuccessful:
Pull Request resolves #48507
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
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.
Joomla allowed usernames containing spaces between words, such as "Ahmad Moussa".
Joomla rejects usernames containing whitespace characters, including spaces between words and leading or trailing whitespace.
Please select:
| Status | New | ⇒ | Pending |
| Category | ⇒ | Libraries |
from backed and frontend works as expected
from cli check aboarken#1
from backed and frontend works as expected from cli check aboarken#1
Thank you @alikon.
| Labels |
Added:
PR-6.1-dev
|
||
I have tested this item ✅ successfully on d8a788b
I have tested this item ✅ successfully on d8a788b
Hello @alikon, thank you again for your patience and please check my second pull request 👍