?
avatar brianteeman
brianteeman
17 Aug 2020

Steps to reproduce the issue

Install joomla

Expected result

Instant notification that the password doesnt meet the minimum length criteria of 12 characters

Actual result

No notification until the form is submitted.

Additional comments

Viewing the source of the paassword field shows a min length of 4

<input type="password" name="jform[admin_password]" id="jform_admin_password" value="" autocomplete="new-password" class="form-control required form-control-danger invalid" maxlength="99" required="" data-min-length="4" aria-invalid="true">

avatar brianteeman brianteeman - open - 17 Aug 2020
avatar joomla-cms-bot joomla-cms-bot - change - 17 Aug 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 17 Aug 2020
avatar brianteeman
brianteeman - comment - 17 Aug 2020

The problem looks like it starts here

avatar infograf768
infograf768 - comment - 18 Aug 2020

Imho it uses the minimum defined here as we are in installation client.
https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/Form/Rule/PasswordRule.php#L50

	$minimumLength    = isset($element['minimum_length']) ? (int) $element['minimum_length'] : 12;
avatar brianteeman
brianteeman - comment - 18 Aug 2020

If it did then it would not be generating the code I showed for the field.

The line you showed is for the validation on submit

avatar infograf768
infograf768 - comment - 18 Aug 2020

If I do not mistake this element would work only when the meter is used as otherwise the js is not used and these parts of the code are ignored.

Basically strengthmeter="true" is not present in the installation password field

if ($meter)
{
	$wa->useScript('field.passwordstrength');
avatar infograf768
infograf768 - comment - 19 Aug 2020

To test, I added strengthmeter="true" to setup.xml
And indeed it accepts passwords of 4 characters minimum
passwordstrength_installation

If I modify to $this->minLength = 12; then, curiously although the green bar is not complete, we get a success message under the meter.

passwordstrength_installation_12

Therefore I guess something is wrong in the meter somewhere...

@zero24

avatar Quy
Quy - comment - 19 Aug 2020

Partial fix in #30424 except for that it is still possible to go to the next page if password doesn't meet the minimum length criteria of 12 characters to be fixed in a separate PR unless someone can propose a solution.

avatar brianteeman brianteeman - change - 21 May 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-05-21 16:15:14
Closed_By brianteeman
avatar brianteeman brianteeman - close - 21 May 2021
avatar brianteeman
brianteeman - comment - 21 May 2021

Closing as per #30424

Add a Comment

Login with GitHub to post a comment