Strong login passwords

0

Hello everyone,

I try to force the passwords to be strong, then I edit the file \WEB-INF\applicationContext.xml to change the default line

<property name="allowedPasswordPattern" value="^.*$"></property>

with

<property name="allowedPasswordPattern" value="^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[\=\.\%\ \!\@\#\$\^\&])(?=.{9,})"></property>

Then force a password of length greater than 8, at least one lowercase, one uppercase, one digit and one special character (=,% !@#$^&).

However it doesn't work for me. How can I solve that?

Thank you very much in advance!

jmcarcar's picture
Joined: Aug 12 2019 - 1:51pm
Last seen: 4 weeks 1 day ago

How did it not work?

swood_1 - 1 month 12 hours ago

For example when trying to register a new user or change my password in login, the complexity of the password is checked and even if you put one that complies (apparently with the regular expression) it says that it is not valid.

Thanks,

jmcarcar - 1 month 9 hours ago

1 Answer:

0

Hi!

Finally (after a lot of try and fail) I find a solution. This expression is working for me:

<property name="allowedPasswordPattern" value="^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[\\!\\$\\@\\#\\=\\(\\)\\:\\+\\-]).{9,}"></property>

This force for a password of length 9 or more, at least one uppercase, one lowercase, one number and one special character of these !$@#=():+-

I have excluded the character "&" because then I got a 404 error.

I hope it helps someone.

Thank you!

 

jmcarcar's picture
Joined: Aug 12 2019 - 1:51pm
Last seen: 4 weeks 1 day ago
Feedback
randomness