Do not allow log in if password update fails

This commit is contained in:
Martin Lensment 2015-04-06 17:01:13 +03:00
parent cca934453b
commit 7f04f2e2fe

View file

@ -21,6 +21,7 @@ class Epp::SessionsController < EppController
if @api_user.try(:active) && cert_valid
if parsed_frame.css('newPW').first
unless @api_user.update(password: parsed_frame.css('newPW').first.text)
response.headers['X-EPP-Returncode'] = '2200'
handle_errors(@api_user) and return
end
end