Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.2] Password Strength Symbols #43484

Merged
merged 5 commits into from
May 22, 2024
Merged

Conversation

brianteeman
Copy link
Contributor

The script used to check for symbols in a password contains a limited set of symbols.

Pull Request for Issue #41552 .

Summary of Changes

This PR updates the script to ensure that all of the the list of special characters/symbols provided by OWASP are also included. They are the punctuation characters that are present on standard US keyboard.
The entire set of special characters/symbols is now @$!#?=;:*-_€%&()`´+[]{}'"|,.<>/~^

I added the additional comment to the licence so that it is clear that the script has been changed from the original which probably should have been done earlier when the regex was updated to include @

Testing Instructions

This change will require using a prebuilt package or npm ci to test

Set the password requirements in the User Options Password Minimum Symbols to 1

Try to create a password containing letters and one or more symbols from this list
+[]{}'"|,.<>/~^

Actual result BEFORE applying this Pull Request

The password will be rejected

Expected result AFTER applying this Pull Request

The password will be accepted

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

The script used to check for symbols in a password contains a limited set of symbols.

This PR updates the script to use the list of special characters provided by [OWASP](https://owasp.org/www-community/password-special-characters). They are the punctuation characters that are present on standard US keyboard.
@joomla-cms-bot joomla-cms-bot added NPM Resource Changed This Pull Request can't be tested by Patchtester PR-5.2-dev labels May 17, 2024
@ceford
Copy link
Contributor

ceford commented May 18, 2024

I have tested this item ✅ successfully on 388d8e3


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

1 similar comment
@viocassel
Copy link
Contributor

I have tested this item ✅ successfully on 388d8e3


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

@alikon
Copy link
Contributor

alikon commented May 19, 2024

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label May 19, 2024
@pe7er pe7er self-assigned this May 21, 2024
@pe7er pe7er enabled auto-merge (squash) May 21, 2024 10:31
@Quy
Copy link
Contributor

Quy commented May 21, 2024

Please fix javascript cs https://ci.joomla.org/joomla/joomla-cms/76291/1/20

@pe7er pe7er disabled auto-merge May 21, 2024 14:16
@brianteeman
Copy link
Contributor Author

i will not be at a pc for the foreseeable future - feel free to update it directly

@pe7er pe7er merged commit 1548e30 into joomla:5.2-dev May 22, 2024
3 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label May 22, 2024
@pe7er
Copy link
Contributor

pe7er commented May 22, 2024

Thank you @brianteeman and @Quy !

@Quy Quy added this to the Joomla! 5.2.0 milestone May 22, 2024
@brianteeman brianteeman deleted the password_strength branch May 24, 2024 17:56
@ghost
Copy link

ghost commented Oct 15, 2024

The symbol "_" is not correctly recognized as a sybmol, so password "0123456789_Aa" is incorrect and throw error that mininum 1 special character (symbol) is required (only after registration form submit). Progress bar is green while paste password. Can You fix that ?

@brianteeman
Copy link
Contributor Author

@MaverickPOZ please do not comment on closed PR - hardly anyone will see it. Please create a new issue

dgrammatiko pushed a commit to dgrammatiko/joomla-cms that referenced this pull request Oct 17, 2024
* [5.2] Password Strength Symbols

The script used to check for symbols in a password contains a limited set of symbols.

This PR updates the script to use the list of special characters provided by [OWASP](https://owasp.org/www-community/password-special-characters). They are the punctuation characters that are present on standard US keyboard.

* final

* cs

Co-authored-by: Quy <quy@nomonkeybiz.com>
@petrovicivan
Copy link

Default installation shows 0 in Password Options->Minimum Symbols

@ghost
Copy link

ghost commented Oct 18, 2024

And so what ? This is default ... Please put 1 in that field and use _ in password.

@petrovicivan
Copy link

petrovicivan commented Oct 19, 2024

https://docs.joomla.org/J5.x:Enhancing_Password_Security_with_Symbolic_Characters#Additional_Notes

This change applies to all Joomla 5.2 installations. Administrators should ensure that the password requirements are updated in the configuration to take full advantage of the enhanced security features.

For the end-user enable by default would be better option

@ghost
Copy link

ghost commented Oct 21, 2024

Ivan, I have fresh J5.2 and nothing change - please provide password with symbol _ "TestPassword123With_" at https://demo.webster-studio.pl/login?view=registration - the bar is green but after submit form the error with "no symbol" appear.

@ghost
Copy link

ghost commented Oct 21, 2024

Screenshot
Screenshot 2024-10-21 at 09-21-55 Login - Joomla 5 Demo Webster-Studio

@ceford
Copy link
Contributor

ceford commented Oct 21, 2024

This is a separate issue. The client side password has passed validation there but the server side uses this:

$nsymbols = preg_match_all('[\W]', $value, $smatch);

on line 133 of libraries/src/Form/Rule/PasswordRule.php - I think underline does not count as a non-word character.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NPM Resource Changed This Pull Request can't be tested by Patchtester PR-5.2-dev
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants