mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 10:49:39 +02:00
Remove parsed_frame helper from epp sessions #2752
This commit is contained in:
parent
c94da28af6
commit
67ae9ff020
2 changed files with 3 additions and 7 deletions
|
@ -75,8 +75,8 @@ class Epp::SessionsController < EppController
|
||||||
end
|
end
|
||||||
|
|
||||||
if success
|
if success
|
||||||
if parsed_frame.css('newPW').first
|
if params[:parsed_frame].css('newPW').first
|
||||||
unless @api_user.update(password: parsed_frame.css('newPW').first.text)
|
unless @api_user.update(password: params[:parsed_frame].css('newPW').first.text)
|
||||||
response.headers['X-EPP-Returncode'] = '2500'
|
response.headers['X-EPP-Returncode'] = '2500'
|
||||||
handle_errors(@api_user) and return
|
handle_errors(@api_user) and return
|
||||||
end
|
end
|
||||||
|
@ -127,8 +127,4 @@ class Epp::SessionsController < EppController
|
||||||
ph = params_hash['epp']['command']['login']
|
ph = params_hash['epp']['command']['login']
|
||||||
{ username: ph[:clID], password: ph[:pw] }
|
{ username: ph[:clID], password: ph[:pw] }
|
||||||
end
|
end
|
||||||
|
|
||||||
def parsed_frame
|
|
||||||
@parsed_frame ||= Nokogiri::XML(request.params[:raw_frame]).remove_namespaces!
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,8 +6,8 @@ class EppController < ApplicationController
|
||||||
|
|
||||||
before_action :generate_svtrid
|
before_action :generate_svtrid
|
||||||
before_action :latin_only
|
before_action :latin_only
|
||||||
before_action :validate_against_schema
|
|
||||||
|
|
||||||
|
before_action :validate_against_schema
|
||||||
def validate_against_schema
|
def validate_against_schema
|
||||||
return if ['hello', 'error'].include?(params[:action])
|
return if ['hello', 'error'].include?(params[:action])
|
||||||
params[:schema] = 'epp-1.0.xsd' unless params[:schema]
|
params[:schema] = 'epp-1.0.xsd' unless params[:schema]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue