[cas-dev] CAS 7.0.0-RC5 change passsword issue

3 views
Skip to first unread message

Colin Wilkinson

unread,
May 15, 2023, 11:25:24 PM5/15/23
to CAS Developer
Hi,

I have posted this on the cas-user group but got no answers.

I think you have a slight coding mistake in PasswordChangeAction.java. When we were testing change password the other current password was coming back null.

I believe you have a coding mistake in the following lines of code as in the below code you are just setting it back to itself.

            Optional.ofNullable(WebUtils.getCredential(requestContext, UsernamePasswordCredential.class))
                    .ifPresent(credential -> bean.setCurrentPassword(bean.getCurrentPassword()));

What I think you meant was
Optional.ofNullable(WebUtils.getCredential(requestContext, UsernamePasswordCredential.class))
                    .ifPresent(credential -> bean.setCurrentPassword(credential   .getPassword()));

See also https://groups.google.com/a/apereo.org/g/cas-user/c/gjrdaNdZPw0

Regards,
Colin

--
You received this message because you are subscribed to the Google Groups "CAS Developer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-dev+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-dev/f83b0244-4c52-4623-950c-bc7b683be3dfn%40apereo.org.

Misagh Moayyed

unread,
May 16, 2023, 11:15:03 PM5/16/23
to CAS Developer
Thank you for the suggestion. Please put together a pull request that corrects the mistake and we'll take it from there.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-dev/98260686-7898-4ca3-8178-ca07664948fan%40apereo.org.
Reply all
Reply to author
Forward
0 new messages