mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
Merge pull request #1420 from internetee/log-error-when-cert-path-is-missing
log error when cert_path is missing
This commit is contained in:
commit
a730e3a491
1 changed files with 4 additions and 0 deletions
|
@ -14,6 +14,10 @@ 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'].blank?
|
||||
raise 'webclient cert (cert_path) missing, registrar (r)epp disabled'
|
||||
end
|
||||
|
||||
server_md5 = Certificate.parse_md_from_string(File.read(ENV['cert_path']))
|
||||
if client_md5 != server_md5
|
||||
epp_errors << {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue