jmcarcar Posted September 16, 2019 Share Posted September 16, 2019 Hello everyone,I try to force the passwords to be strong, then I edit the file WEB-INFapplicationContext.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! Link to comment Share on other sites More sharing options...
swood_1 Posted September 18, 2019 Share Posted September 18, 2019 How did it not work? Link to comment Share on other sites More sharing options...
jmcarcar Posted September 18, 2019 Author Share Posted September 18, 2019 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, Link to comment Share on other sites More sharing options...
jmcarcar Posted September 19, 2019 Author Share Posted September 19, 2019 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! Link to comment Share on other sites More sharing options...
Boris Gisselere Posted December 4, 2020 Share Posted December 4, 2020 Hi jmcarcar !I only find your post talking about that.You said : "to register a new user or change my password in login"My question is :It works fine to refister a new user but nothing work when I wnat to change my password in login.Did you make another change ?Thank you.Boris. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now