deanilvincent / check-password-strength

A simple npm package that checks the password strength of a certain passphrase. A password strength checker based from Javascript RegEx.
https://www.npmjs.com/package/check-password-strength
MIT License
161 stars 17 forks source link

What are the affected if input with wrong symbols #78

Open alfangr opened 2 months ago

alfangr commented 2 months ago

I just want to know what the effect is if I enter the wrong symbol?. I would expect an incorrect symbol to show a warning or error such as an invalid symbol result. I've tried the demo with the space symbol but the results make no difference. Then, what is its function?

Ennoriel commented 2 months ago

If you enter a symbol that is not on the list, it won't be recognized as a symbol but won't be considered wrong either. The character will be treated as a normal lowercase letter.

This has been bothering me for a while. There should be a mode, if not the standard, where all non-alphabetic characters are considered as symbols.

As a French speaker, all accented letters should be treated as symbols (é, è, ê, ë...).

@deanilvincent what do you think?

alfangr commented 2 months ago

Ah i see, will be affected to contains array value. Thanks @Ennoriel.

Agreed, it needs to be considered as symbols if it is non-alphabetic.

deanilvincent commented 1 month ago

Hi @Ennoriel & @alfangr , thank you for bringing this up. The package is currently support common symbols https://github.com/deanilvincent/check-password-strength/blob/b01538b0b67e94a0aa09ca4e02be3a938b75c504/src/index.js#L28 Having new symbols is actually a good feature suggestion. This will also broaden the reach of our package. We can also include different symbols from different languanges like Hebrew, Chinese, Arabic, Russian etc. We can make a PR for that :)