Install joomla
Instant notification that the password doesnt meet the minimum length criteria of 12 characters
No notification until the form is submitted.
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">
Labels |
Added:
?
|
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;
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
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');
To test, I added strengthmeter="true"
to setup.xml
And indeed it accepts passwords of 4 characters minimum
If I modify to $this->minLength = 12;
then, curiously although the green bar is not complete, we get a success message under the meter.
Therefore I guess something is wrong in the meter somewhere...
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-05-21 16:15:14 |
Closed_By | ⇒ | brianteeman |
The problem looks like it starts here
joomla-cms/libraries/src/Form/Field/PasswordField.php
Line 157 in 0ebb8a6