Skip to content

Add minimum lowercase rule for password validation.#24230

Merged
wilsonge merged 6 commits intojoomla:stagingfrom
HLeithner:add-lowercase-password-check
Mar 22, 2019
Merged

Add minimum lowercase rule for password validation.#24230
wilsonge merged 6 commits intojoomla:stagingfrom
HLeithner:add-lowercase-password-check

Conversation

@HLeithner
Copy link
Member

Pull Request for Issue #24156 .

Summary of Changes

Add missing lower case requirement for passwords

Testing Instructions

Set minimum lowercase count to 0 or higher.
Change password. Use password with more and less lowercase characters

Expected result

It should be possible to force a minimum of lowercase characters.

Actual result

Option is missing.

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-staging labels Mar 18, 2019
; Messages
COM_USERS_MSG_NOT_ENOUGH_INTEGERS_N="Password does not have enough digits. At least %s digits are required."
COM_USERS_MSG_NOT_ENOUGH_INTEGERS_N_1="Password does not have enough digits. At least 1 digit is required."
COM_USERS_MSG_NOT_ENOUGH_LOWERCASE_LETTERS_N="Password does not have enough lowercase characters. At least %s lower case characters are required."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lower case can be written as either one word or two. At a minimum we should be consistent in only using one variant. Using the gov.uk website as a source we should standardise on one word not two

COM_USERS_MSG_NOT_ENOUGH_INTEGERS_N="Password does not have enough digits. At least %s digits are required."
COM_USERS_MSG_NOT_ENOUGH_INTEGERS_N_1="Password does not have enough digits. At least 1 digit is required."
COM_USERS_MSG_NOT_ENOUGH_LOWERCASE_LETTERS_N="Password does not have enough lowercase characters. At least %s lower case characters are required."
COM_USERS_MSG_NOT_ENOUGH_LOWERCASE_LETTERS_N_1="Password does not have enough lowercase characters. At least 1 lower case character is required."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above

@HLeithner
Copy link
Member Author

I did a copy of the uppercase sentence,.. should be changed too?

@brianteeman
Copy link
Contributor

I just realised that too ;)

I don't care if we use one word or two but we should be consistent - especially in the same sentence. Should help the translators as well

COM_USERS_CONFIG_FIELD_MINIMUM_INTEGERS="Minimum Integers"
COM_USERS_CONFIG_FIELD_MINIMUM_INTEGERS_DESC="Set the minimum number of integers that must be included in a password."
COM_USERS_CONFIG_FIELD_MINIMUM_LOWERCASE="Minimum Lower Case"
COM_USERS_CONFIG_FIELD_MINIMUM_LOWERCASE_DESC="Set the minimum number of lower case alphabetical characters required for a password."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change here? Label too?

@eric-lamy-agerix
Copy link

Tested with Joomla! Patch Tester and it works fine

@ghost
Copy link

ghost commented Mar 18, 2019

@agerix please mark your Test at Issue Tracker as "Tested successfully".

@eric-lamy-agerix
Copy link

I have tested this item ✅ successfully on ee1d90a

Hello, I've test with one and with more than one lower case


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

@eric-lamy-agerix
Copy link

I've just do it Franz, I'm a new tester... :)


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

@HLeithner
Copy link
Member Author

@Quy you are right, I changed all to two words as in the label.

@dgrammatiko
Copy link
Contributor

@HLeithner you need to reflect these changes here: https://github.com/joomla/joomla-cms/blob/staging/media/system/js/passwordstrength.js

A fair warning tho, that file is Mootools based so in essence wouldn't be advisable to ask anyone to add any new functionality there. In short better do this in the 4.0 repo...

@brianteeman
Copy link
Contributor

This is already available in j4

@dgrammatiko
Copy link
Contributor

This is already available in j4

Well I lost track of the things I did already for J4 😉

Anyways, then at a bare minimum, the last function in the Mootools version needs to be adapted

@HLeithner
Copy link
Member Author

@dgrammatiko this file looks like its only show the password strength and doesn't have anything to do with the requirement.

@dgrammatiko
Copy link
Contributor

@HLeithner it should read the requirements for calculating the strength, or maybe not...

@HLeithner
Copy link
Member Author

The script uses the threshold that is set as parameter I didn't find any calculation based on the requirements parameters...

@Quy
Copy link
Contributor

Quy commented Mar 20, 2019

I have tested this item ✅ successfully on da122f3


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

@jeckodevelopment
Copy link
Member

@agerix can you please submit again your test?


if ($nLowercase < $minimumLowercase)
{
\JFactory::getApplication()->enqueueMessage(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be easy to namespace

if ($nLowercase < $minimumLowercase)
{
\JFactory::getApplication()->enqueueMessage(
\JText::plural('COM_USERS_MSG_NOT_ENOUGH_LOWERCASE_LETTERS_N', $minimumLowercase),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too

@HLeithner
Copy link
Member Author

If I add the name spaces here I have to change the complete file and I think this would maybe give a merge conflict when george merge it into 4.0

@brianteeman
Copy link
Contributor

J4 already has a lowercase rule

@alikon
Copy link
Contributor

alikon commented Mar 21, 2019

maybe it's me but the 4.0 https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/Form/Rule/PasswordRule.php didn't have lowercase yet....

@HLeithner not an expert on "easy merging" matter but looking the 2 file side by side ....

@alikon
Copy link
Contributor

alikon commented Mar 21, 2019

I have tested this item ✅ successfully on e386929


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

1 similar comment
@Quy
Copy link
Contributor

Quy commented Mar 21, 2019

I have tested this item ✅ successfully on e386929


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

@Quy
Copy link
Contributor

Quy commented Mar 21, 2019

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Mar 21, 2019
@wilsonge wilsonge merged commit 857fa53 into joomla:staging Mar 22, 2019
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Mar 22, 2019
@zero-24 zero-24 added this to the Joomla 3.9.5 milestone Mar 22, 2019
@HLeithner HLeithner deleted the add-lowercase-password-check branch March 29, 2020 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Language Change This is for Translators

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants