diff --git a/app/controllers/epp/sessions_controller.rb b/app/controllers/epp/sessions_controller.rb index 892628ab7..d3db24723 100644 --- a/app/controllers/epp/sessions_controller.rb +++ b/app/controllers/epp/sessions_controller.rb @@ -13,9 +13,8 @@ module Epp webclient_request = ENV['webclient_ips'].split(',').map(&:strip).include?(request.ip) if webclient_request && !Rails.env.test? && !Rails.env.development? client_md5 = Certificate.parse_md_from_string(request.env['HTTP_SSL_CLIENT_CERT']) - if ENV['cert_path'].nil? - logger.error('webclient cert (cert_path) missing, registrar epp/repp disabled') - end + fail 'webclient cert (cert_path) missing, registrar epp/repp disabled' unless ENV['cert_path'].present? + server_md5 = Certificate.parse_md_from_string(File.read(ENV['cert_path'])) if client_md5 != server_md5 epp_errors << {