I respond to myself to help other people in the future. In passwordMeter.js, policyPattern is used as a string in : var policyPatternRegex = new RegExp(policyPattern); So we need to double escape the "\", in my case it will be : ^(?=.{12,}$)(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*\\W).*$ (which ultimately isn't the best regexp for passwords, but that's not the point)
Thanks to this post : https://stackoverflow.com/a/6793802 So I think the documentation at https://apereo.github.io/cas/6.5.x/password_management/Password-Management.html should be fix to double the \ in \d. Le jeudi 25 août 2022 à 03:07:56 UTC+2, Vincent Weber a écrit : > Hello, > Did you find the solution ? > I have the same problem with this configuration : > > cas.authn.pm.core.policy-pattern=^(?=.{12,}$)(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*\W).*$ > > On CAS 6.5.7. > When I try to reset the password, it is never "OK" with my password, even > if it respect the regexp. > > Le mardi 15 mars 2022 à 12:39:12 UTC+1, stonej a écrit : > >> I did upgrade from 6.5.0 but have updated the policy pattern to : >> >> >> cas.authn.pm.core.password-policy-pattern=^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,20} >> >> Also having issues with emailing from password management, but may have >> to log that as a seperate query >> >> Thanks >> >> On Tuesday, March 15, 2022 at 8:33:50 AM UTC Łukasz Woźniak wrote: >> >>> You've upgrade or have new fresh version? I've got similar problem but >>> I'm upgrading instance from 6.3.7. And there was change in the template and >>> policyPattern was null, because it was changed to passwordPolicyPattern. >>> Check the template if You override it. >>> >>> wt., 15 mar 2022 o 00:25 stonej <sto...@hope.ac.uk> napisał(a): >>> >>>> Hello All, >>>> >>>> I am using CAS 6.5.1 and using the password management add on. It all >>>> works fine with picking up the AD password expired setting, but I cannot >>>> seem to get a good password. >>>> >>>> It asks for 1 lowercase, 1 uppercase, 1 number and 1 special character >>>> but no matter what I try i comes up that the password does not match >>>> requirements. >>>> >>>> Any help ? >>>> Thanks >>>> >>>> >>>> >>>> -- >>>> - Website: https://apereo.github.io/cas >>>> - Gitter Chatroom: https://gitter.im/apereo/cas >>>> - List Guidelines: https://goo.gl/1VRrw7 >>>> - Contributions: https://goo.gl/mh7qDG >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "CAS Community" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to cas-user+u...@apereo.org. >>>> To view this discussion on the web visit >>>> https://groups.google.com/a/apereo.org/d/msgid/cas-user/7842071e-ad46-420d-b3f1-6fef11247c44n%40apereo.org >>>> >>>> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/7842071e-ad46-420d-b3f1-6fef11247c44n%40apereo.org?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- - Website: https://apereo.github.io/cas - Gitter Chatroom: https://gitter.im/apereo/cas - List Guidelines: https://goo.gl/1VRrw7 - Contributions: https://goo.gl/mh7qDG --- You received this message because you are subscribed to the Google Groups "CAS Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscr...@apereo.org. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/003e9df6-2d93-4829-b19a-322557eba10en%40apereo.org.