NPM Resource Changed bug PR-5.4-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 Password must not have spaces at the beginning or end

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 Password must not have spaces at the beginning or end
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."

avatar HLeithner
HLeithner - comment - 15 Oct 2025

This pull request has been automatically rebased to 5.4-dev.

avatar Milo-W
Milo-W - comment - 17 Oct 2025

Is the change only for the characters?
Because it's not the only issue here... the logics of validation IMO should change into the screen where you actually input the password...

avatar wojsmol
wojsmol - comment - 17 Oct 2025

@richard67 prebuild packages for this PR aren't available.

avatar richard67 richard67 - change - 17 Oct 2025
Title
[5.3] Installation - Admin password must be at least 12 characters long
[5.4] Installation - Admin password must be at least 12 characters long
avatar richard67 richard67 - edited - 17 Oct 2025
avatar richard67
richard67 - comment - 17 Oct 2025

@richard67 prebuild packages for this PR aren't available.

Seems they were too old and so deleted. I have just triggered a new build, they should be available again in some 30 minutes.

avatar richard67 richard67 - change - 17 Oct 2025
Labels Added: PR-5.4-dev
Removed: PR-5.3-dev
avatar wojsmol
wojsmol - comment - 18 Oct 2025

@Milo-W Prebuild packages are now available for this PR.

avatar muhme
muhme - comment - 31 Oct 2025

Tested with JBT and en-GB

  • Before the PR
    • There is a note 'Enter at least 12 characters.' and a orange hint 'Password doesn't meet the site's requirements.' But if I use a shorter password, I can continue. Installation fails later with clear red error message "Password is too short." – But of course, it would be better to fail directly on the password input page.
    • With one space in the middle the installation is working.
    • With only 12 spaces as password the installation fails later with clear red error message 'Password must not have spaces at the beginning or end.' – But again, it would be better to fail directly on the password input page.
  • Graft PRs full package and deleted configuration.php
    • Tested password shorter than 12 chars have red error 'Enter at least 12 characters.'
      • ⚠️ But with typing each character the error message pops-up new as nervous fidgeting. Is it possible to check more user-friendly on 'Setup Database Connection' click? See demo
      • ❌ Test fails as even with a space in the middle, which was working before, there is the error message 'Password must not have spaces at the beginning or end.'
avatar alikon
alikon - comment - 1 Nov 2025

but with typing each character the error message pops-up new as nervous fidgeting. Is it possible to check more user-friendly

used on blur now

Test fails as even with a space in the middle, which was working before, there is the error message 'Password must not have spaces at the beginning or end.'

see previous comment "We don't allow white space inside passwords"
#46173 (comment)

avatar ceford ceford - test_item - 3 Nov 2025 - Tested successfully
avatar ceford
ceford - comment - 3 Nov 2025

I have tested this item ✅ successfully on f3d0cc9


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

avatar muhme
muhme - comment - 6 Nov 2025

@alikon Thank you very much for further improving this PR. We discussed this PR in yesterday's maintainer meeting. Since white spaces within passwords currently work (we have tested creating a user, login and changing the password), we would not change this functionality in a minor release. Could you please adjust the PR to that it only checks for spaces in the beginning and end of a password?

avatar tecpromotion
tecpromotion - comment - 6 Nov 2025

@alikon Thank you very much for further improving this PR. We discussed this PR in yesterday's maintainer meeting. Since white spaces within passwords currently work (we have tested creating a user, login and changing the password), we would not change this functionality in a minor release. Could you please adjust the PR to that it only checks for spaces in the beginning and end of a password?

Spaces within passwords are expected behaviour; there are password managers that generate such passwords, and this should continue to work.

avatar alikon alikon - change - 8 Nov 2025
Labels Added: Updates Requested
avatar alikon
alikon - comment - 9 Nov 2025

now Password must not have spaces at the beginning or end should be fixed

avatar alikon alikon - change - 9 Nov 2025
The description was changed
avatar alikon alikon - edited - 9 Nov 2025
avatar muhme
muhme - comment - 10 Nov 2025

Thank you very much @alikon for your adjustments. Re-Tested with JBT, Firefox and en-GB:

  • Graft PRs full package and deleted configuration.php
  • ✅ Nervous fidgeting is fixed
  • ✅ It is possible to have spaces in the middle of the password
  • ✅ Spaces in the beginning or end of the password are detected and corred red error 'Password must not have spaces at the beginning or end.'
  • ✅ For passwords, shorter than 12 chars, red error 'Enter at least 12 characters.' is shown, and continue to setup database connection is not possible
  • ❌ Click 'Setup Database Connection' is not working, it needs one more click or click in the page to continue
    • And JavaScript error: The invalid form control with name=‘jform[db_user]’ is not focusable.
  • ❌ There is a discrepancy between the red 'Password must not have spaces at the beginning or end.' and the green message 'Password accepted'. See the following screenshot. Can we also use JavaScript to check for spaces at the beginning and end and display a corresponding error message? Or simple change to 'Password length accepted.'?
shoot
avatar laoneo
laoneo - comment - 12 Nov 2025

Why do you don't use the existing validator, like we normally do in Joomla instead of copy the logic?

avatar alikon
alikon - comment - 13 Nov 2025

not sure to understand

avatar alikon
alikon - comment - 13 Nov 2025

still don't understand that script doesn't even take care of space on first and last psw char how it should be
and more is just an indicator you can still set psw lenght less than 12 char and it goes on step3

avatar laoneo
laoneo - comment - 13 Nov 2025

Then better to fix that script instead of having duplicated functionality.

d634829 13 Nov 2025 avatar alikon undo
avatar joomla-cms-bot joomla-cms-bot - change - 13 Nov 2025
Category JavaScript Installation Installation
avatar joomla-cms-bot joomla-cms-bot - change - 13 Nov 2025
Category Installation JavaScript Repository NPM Change Installation
avatar alikon
alikon - comment - 13 Nov 2025

ah ok, now it's a little clearer to me 😃

avatar alikon alikon - change - 16 Nov 2025
Labels Added: NPM Resource Changed
Removed: Updates Requested
avatar joomla-cms-bot joomla-cms-bot - change - 16 Nov 2025
Category Installation JavaScript Repository NPM Change JavaScript Repository NPM Change
avatar alikon alikon - change - 18 Nov 2025
Labels Added: Updates Requested
avatar laoneo
laoneo - comment - 20 Nov 2025

Just wondering, did the CS changes a tool or is it your preference?

avatar alikon
alikon - comment - 22 Nov 2025

both VScode + preference

avatar alikon alikon - change - 23 Nov 2025
Labels Removed: Updates Requested
avatar joomla-cms-bot joomla-cms-bot - change - 23 Nov 2025
Category JavaScript Repository NPM Change JavaScript Repository NPM Change Unit Tests
avatar alikon
alikon - comment - 23 Nov 2025

added some system test

avatar HLeithner
HLeithner - comment - 23 Nov 2025

why all this unrelated style changes? that makes it harder to review... Also can we be sure that the space is always forbidden at the beginning and the end? Especially if the password strength meter is not used for joomla passwords.

Add a Comment

Login with GitHub to post a comment