diff --git a/app/controllers/epp/sessions_controller.rb b/app/controllers/epp/sessions_controller.rb index e84659c86..6c3509786 100644 --- a/app/controllers/epp/sessions_controller.rb +++ b/app/controllers/epp/sessions_controller.rb @@ -87,10 +87,11 @@ module Epp end if success - if params[:parsed_frame].css('newPW').first - unless @api_user.update(plain_text_password: params[:parsed_frame].css('newPW').first.text) - handle_errors(@api_user) and return - end + new_password = params[:parsed_frame].at_css('newPW')&.text + + if new_password.present? + @api_user.plain_text_password = new_password + @api_user.save! end epp_session = EppSession.new