mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 19:48:28 +02:00
Merge branch 'master' into add-machine-readable-list-of-blocked-domains
This commit is contained in:
commit
26858a7e8f
9 changed files with 82 additions and 36 deletions
|
@ -26,7 +26,8 @@ module Epp
|
|||
end
|
||||
|
||||
if !Rails.env.development? && (!webclient_request && @api_user)
|
||||
unless @api_user.api_pki_ok?(request.env['HTTP_SSL_CLIENT_CERT'], request.env['HTTP_SSL_CLIENT_S_DN_CN'])
|
||||
unless @api_user.pki_ok?(request.env['HTTP_SSL_CLIENT_CERT'],
|
||||
request.env['HTTP_SSL_CLIENT_S_DN_CN'])
|
||||
epp_errors << {
|
||||
msg: 'Authentication error; server closing connection (certificate is not valid)',
|
||||
code: '2501'
|
||||
|
|
|
@ -31,7 +31,8 @@ class Registrar
|
|||
end
|
||||
|
||||
if @depp_user.pki
|
||||
unless @api_user.registrar_pki_ok?(request.env['HTTP_SSL_CLIENT_CERT'], request.env['HTTP_SSL_CLIENT_S_DN_CN'])
|
||||
unless @api_user.pki_ok?(request.env['HTTP_SSL_CLIENT_CERT'],
|
||||
request.env['HTTP_SSL_CLIENT_S_DN_CN'], api: false)
|
||||
@depp_user.errors.add(:base, :invalid_cert)
|
||||
end
|
||||
end
|
||||
|
@ -205,4 +206,4 @@ class Registrar
|
|||
redirect_to new_registrar_user_session_url, alert: @depp_user.errors.full_messages.first
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue