User tests: Successful: Unsuccessful:
Pull Request for Issue #30406 .
Add meter to the installation admin password.
Update minimum length value that was missed in PR #29859.
Fix meter's complete message displaying prematurely.
Database password data-min-length
attribute is also updated to 12 but no validation is done as before.
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.
Download the package installer at the bottom of the page and install.
or
Apply PR.
Run npm run build:js
Reinstall.
Use browser's inspector to check password fields for data-min-length="12"
and not data-min-length="4"
.
See password meter under admin password field and ensure the meter's complete message displays on the 12th character and not before.
Status | New | ⇒ | Pending |
Category | ⇒ | JavaScript Repository NPM Change Installation Libraries |
This is for the installation setup only.
Updated test instructions to clarify.
Yes but the javascript is the same javascript used for all password fields
This implements nicely the meter in installation.
We can't expect preventing going to the next page as, alas, this is a unique page, contrary to 3.x...
One small drawback is that the meter does not show a result when the field is automatically filled by the browser.
If that can be solved in the js, would be great, otherwise I will mark my test OK.
Independent from this PR
Frontend registration needs a lot of care as the meter is not present (if added needs also the meter
class) and strings are not even translated.
Can be done after this is merged.
Confirmed. I starts getting green at 8 characters
I think this comes from
const meter = document.createElement('meter');
meter.setAttribute('id', `progress-${index}`);
meter.setAttribute('min', 0);
meter.setAttribute('max', 100);
meter.setAttribute('low', 40);
meter.setAttribute('high', 60);
meter.setAttribute('optimum', 80);
meter.value = initialVal;
I tried to add attributes to the setup.xml password field as it would work if we had
optimum="100" low="100" high="0"
but it looks like the js does not include fetching such attributes from the field.
This is why I commented about the removal of certain lines in the javascript
Not sure the lines deleted deal with the bar itself. They deal with the message below.
One small drawback is that the meter does not show a result when the field is automatically filled by the browser.
The password field has autocomplete="new-password"
attribute which should prevent auto filling by the browser. If it is fixable in the js, then let's do it in a separate PR.
The password field has autocomplete="new-password" attribute which should prevent auto filling by the browser. If it is fixable in the js, then let's do it in a separate PR.
Sure. To describe better: Firefox stores passwords and when clicking in the field, it displays a dropdown with possible passwords, letting the user choose among them. if one is clicked then it is entered in the field and we have the result above. To really use the meter, one has to enter character per character in the field.
Not a very big deal imho.
@dgrammatiko Same result.
Labels |
Added:
NPM Resource Changed
?
|
Changing high and optimum values yield the desired result. Thank you both.
I have tested this item
Also tested backend and it looks like working fine.
@Magnytu2
see
#30424 (comment)
We will make patch as soon as this is merged
If this PR works for you (it is limited to installation and solves the js generally speaking), please test it OK here:
https://issues.joomla.org/tracker/joomla-cms/30424
I have tested this item
Everything is working fine. During the installation as during the creation of a user in the backend.
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-08-21 10:00:32 |
Closed_By | ⇒ | rdeutz | |
Labels |
Added:
?
|
Am I missing something here. If the site owner sets password criteria then surely they will no longer be part of the strength meter