bug PR-5.3-dev Pending

User tests: Successful: Unsuccessful:

avatar alikon
alikon
26 Sep 2025

Pull Request for Issue #46111, #42289 .

Summary of Changes

Admin password must be at least 12 characters long and not contains spaces

Testing Instructions

Install Joomla 5.3.x
At Login Data: set a short <12 char and or use spaces as 'Set the username for your Super User account. *'

Actual result BEFORE applying this Pull Request

The installation process goes on until it gets stuck in the 'Installation progress' phase. There is no possibility to cancel, stop or do something other than go back in the browser.

Expected result AFTER applying this Pull Request

you cannot proceed untill you set a minimum password of 12 chars and without spaces
image

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar alikon alikon - open - 26 Sep 2025
avatar alikon alikon - change - 26 Sep 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Sep 2025
Category JavaScript Installation
avatar tecpromotion
tecpromotion - comment - 26 Sep 2025

@alikon Please do not use hard-coded strings. This should be a variable so that appropriate translations can be made in all languages.

avatar alikon alikon - change - 26 Sep 2025
Labels Added: PR-5.3-dev
avatar alikon
alikon - comment - 26 Sep 2025

@tecpromotion no more hard-coded strings

avatar brianteeman brianteeman - test_item - 26 Sep 2025 - Tested successfully
avatar brianteeman
brianteeman - comment - 26 Sep 2025

I have tested this item ✅ successfully on 65a2286


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

avatar tecpromotion
tecpromotion - comment - 26 Sep 2025

Does it make sense to check for invalid characters here as well, or do we need a new PR for that?
I just entered four letters and the rest as spaces. The bar turns green and at the very end, an error message appears saying that the password must not contain any spaces, and nothing works anymore.

Screenshot in german but you see the problem.
Bildschirmfoto 2025-09-26 um 11 08 33

avatar alikon alikon - change - 26 Sep 2025
Labels Added: bug
avatar alikon
alikon - comment - 26 Sep 2025

the only chars that is been checked on installation should be spaces, check added

avatar alikon alikon - change - 26 Sep 2025
The description was changed
avatar alikon alikon - edited - 26 Sep 2025
avatar tecpromotion
tecpromotion - comment - 26 Sep 2025

It works in principle, but the string JFIELD_PASSWORD_SPACES_IN_PASSWORD is not entirely correct, as spaces within the password are not accepted either. However, it only refers to the beginning and end.

avatar alikon
alikon - comment - 26 Sep 2025

then the text of JFIELD_PASSWORD_SPACES_IN_PASSWORD="Password must not have spaces at the beginning or end." is wrong

as it is only used here

$valueLength = \strlen($value);
// We set a maximum length to prevent abuse since it is unfiltered.
if ($valueLength > 4096) {
Factory::getApplication()->enqueueMessage(Text::_('JFIELD_PASSWORD_TOO_LONG'), 'error');
}
// We don't allow white space inside passwords
$valueTrim = trim($value);
// Set a variable to check if any errors are made in password
$validPassword = true;
if (\strlen($valueTrim) !== $valueLength) {
Factory::getApplication()->enqueueMessage(
Text::_('JFIELD_PASSWORD_SPACES_IN_PASSWORD'),
'error'
);
$validPassword = false;
}

it should be JFIELD_PASSWORD_SPACES_IN_PASSWORD="Password must not have spaces."

Add a Comment

Login with GitHub to post a comment