diff --git a/server/src/main/java/password/pwm/http/servlet/newuser/NewUserServlet.java b/server/src/main/java/password/pwm/http/servlet/newuser/NewUserServlet.java index 88f00db8d..a64a7a631 100644 --- a/server/src/main/java/password/pwm/http/servlet/newuser/NewUserServlet.java +++ b/server/src/main/java/password/pwm/http/servlet/newuser/NewUserServlet.java @@ -423,7 +423,7 @@ static PasswordUtility.PasswordCheckInfo verifyForm( validationFlags.toArray( new FormUtility.ValidationFlag[ validationFlags.size() ] ) ); - NewUserUtils.remoteVerifyFormData( pwmRequest, newUserForm ); + NewUserUtils.remoteVerifyFormData( pwmRequest, newUserForm, null ); final UserInfo uiBean = UserInfoBean.builder() .cachedPasswordRuleAttributes( FormUtility.asStringMap( formValueData ) ) diff --git a/server/src/main/java/password/pwm/http/servlet/newuser/NewUserUtils.java b/server/src/main/java/password/pwm/http/servlet/newuser/NewUserUtils.java index 838bd3ee7..4d5a92d28 100644 --- a/server/src/main/java/password/pwm/http/servlet/newuser/NewUserUtils.java +++ b/server/src/main/java/password/pwm/http/servlet/newuser/NewUserUtils.java @@ -301,7 +301,7 @@ static void createUser( NewUserUtils.LOGGER.trace( pwmSession, () -> "new user ldap creation process complete, now authenticating user" ); // write data to remote web service - remoteWriteFormData( pwmRequest, newUserForm ); + remoteWriteFormData( pwmRequest, newUserForm, newUserDN ); // authenticate the user to pwm final UserIdentity userIdentity = new UserIdentity( newUserDN, pwmApplication.getConfig().getDefaultLdapProfile().getIdentifier() ); @@ -529,7 +529,8 @@ static Map figureDisplayableProfiles( final PwmRequest pwmReques static void remoteVerifyFormData( final PwmRequest pwmRequest, - final NewUserForm newUserForm + final NewUserForm newUserForm, + final String userDn ) throws PwmUnrecoverableException, PwmDataValidationException @@ -537,13 +538,15 @@ static void remoteVerifyFormData( remoteSendFormData( pwmRequest, newUserForm, + userDn, FormDataRequestBean.Mode.verify ); } static void remoteWriteFormData( final PwmRequest pwmRequest, - final NewUserForm newUserForm + final NewUserForm newUserForm, + final String userDn ) throws PwmUnrecoverableException, PwmDataValidationException @@ -551,6 +554,7 @@ static void remoteWriteFormData( remoteSendFormData( pwmRequest, newUserForm, + userDn, FormDataRequestBean.Mode.write ); } @@ -558,6 +562,7 @@ static void remoteWriteFormData( private static void remoteSendFormData( final PwmRequest pwmRequest, final NewUserForm newUserForm, + final String userDn, final FormDataRequestBean.Mode mode ) @@ -583,6 +588,7 @@ private static void remoteSendFormData( .formInfo( formInfo ) .formConfigurations( newUserProfile.readSettingAsForm( PwmSetting.NEWUSER_FORM ) ) .formValues( newUserForm.getFormData() ) + .userDN( userDn ) .build(); final FormDataResponseBean formDataResponseBean = restFormDataClient.invoke( formDataRequestBean, pwmRequest.getLocale() );