mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 06:34:46 +02:00
parent
77678681a6
commit
e01f412d76
3 changed files with 16 additions and 6 deletions
|
@ -182,7 +182,7 @@ module Epp
|
|||
end
|
||||
|
||||
def transfer
|
||||
authorize! :transfer, @domain, @password
|
||||
authorize! :transfer, @domain
|
||||
action = params[:parsed_frame].css('transfer').first[:op]
|
||||
|
||||
if @domain.non_transferable?
|
||||
|
@ -194,6 +194,18 @@ module Epp
|
|||
return
|
||||
end
|
||||
|
||||
provided_transfer_code = params[:parsed_frame].css('authInfo pw').text
|
||||
wrong_transfer_code = provided_transfer_code != @domain.transfer_code
|
||||
|
||||
if wrong_transfer_code
|
||||
epp_errors << {
|
||||
code: '2202',
|
||||
msg: 'Invalid authorization information',
|
||||
}
|
||||
handle_errors
|
||||
return
|
||||
end
|
||||
|
||||
@domain_transfer = @domain.transfer(params[:parsed_frame], action, current_user)
|
||||
|
||||
if @domain.errors[:epp_errors].any?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue