Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Which character classes are allowed for users passowrd?

What I have tried:

I have tried [A-Z] [a-z] [0-9] and !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ but some of them are not allowed
Posted
Updated 3-Jun-21 5:59am
Comments
Richard MacCutchan 3-Jun-21 12:00pm    
In theory all characters are allowed. But you did not tell us what you tried, where you tried it, or exactly what errors or problems you encountered.
MagdalenaHrda 4-Jun-21 5:49am    
I'm sorry not to be precise enough. I have tried exactly this password:

Wl1xttb-.!G6N${>-T^>[o}tg
Richard MacCutchan 4-Jun-21 5:55am    
And? Tried it where? What happened?

We have no idea what you are doing, so unless you explain in detail there is no way we can suggest a possible solution.
MagdalenaHrda 4-Jun-21 6:11am    
OK, I tried to set a new password in my user account for this forum after receiving a temporary password. When I tried to save the password I got following error message:
Your password contained text that was not compatible with our system such as script or server directives.
Richard MacCutchan 4-Jun-21 6:41am    
Then you posted your question in the wrong place. Please go to Bugs and Suggestions[^] and post the details, and the administrators will help you.

1 solution

There are no hard-and-fast rules that everyone must obey when it comes to passwords at all, much less an "approved character list". Different sites - and different applications - will enforce different policies which may involve:

* Password minimum length
* Password maximum length
* Numeric characters required
* Upper and lower case required
* Special characters (i.e. non-numeric, non-alphabetic) required
* May not contain words in a dictionary (so no "my%password" or similar)

But don't have to.
Strong passwords are important, but they are not easily remembered, so they can reduce security considerably: the '"post-in-password" stuck to the side of the monitor' syndrome.

It's up to you what to do - though estimating password strength can help users by encouraging them to use stronger ones* - the really important thing from your side is to ensure that you store it properly, rather than trying to force a user to strengthen his selection. That's more complicated than you might think: Password Storage: How to do it.[^]


* My bank does this: it rated mine as "Wow! Now that's a strong password!" But I have no idea what my password is: my password manager deals with that, not me!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900