Forgot Password/Crowd Integration exception handling and regex improvements

Type atlassian
Modified 2018-02-08T06:24:13


If JIRA is integrated with Crowd, and Crowd has password restrictions (e.g. regex), a user will receive a stack trace in JIRA if the new password does not meet Crowd's password requirements (e.g. through the Forgot Password link in JIRA).

{noformat} java.lang.IllegalArgumentException: Could not change the password for USER. Reason: Your new password does not meet the directory complexity requirements at com.atlassian.crowd.integration.osuser.CrowdCredentialsProvider.changePassword( at com.opensymphony.user.User.setPassword( at com.atlassian.jira.web.action.user.ChangePassword.doExecute( at webwork.action.ActionSupport.execute( at com.atlassian.jira.action.JiraActionSupport.execute( at webwork.dispatcher.GenericDispatcher.executeAction( at com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service( {noformat}

This may require a fix in both Crowd and JIRA. On the Crowd side, the client library may need to let JIRA know about the password restrictions for this JIRA instance. On the JIRA side, JIRA will need to read any password restrictions provided by Crowd for this app and catch the IllegalArgumentException to provide a more elegant message when password criteria is not met.