Remove redundant api check blocks

This commit is contained in:
Karl Erik Õunapuu 2020-05-05 14:06:02 +03:00
parent 0fa7fcc771
commit 2dbcbf1c29
4 changed files with 22 additions and 21 deletions

View file

@ -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'