diff --git a/app/controllers/epp/contacts_controller.rb b/app/controllers/epp/contacts_controller.rb index c79f4cb58..697cfdb18 100644 --- a/app/controllers/epp/contacts_controller.rb +++ b/app/controllers/epp/contacts_controller.rb @@ -59,7 +59,7 @@ class Epp::ContactsController < EppController end def find_contact - code = params[:parsed_frame].css('id').text.strip.downcase + code = params[:parsed_frame].css('id').text.strip @contact = Epp::Contact.find_by(code: code) if @contact.blank? diff --git a/spec/epp/contact_spec.rb b/spec/epp/contact_spec.rb index fd25994a6..597fd6292 100644 --- a/spec/epp/contact_spec.rb +++ b/spec/epp/contact_spec.rb @@ -851,6 +851,21 @@ describe 'EPP Contact', epp: true do response[:results].count.should == 1 end + it 'should honor new contact code format' do + @registrar1_contact = Fabricate(:contact, code: 'REGISTRAR1:test:custom:code') + @registrar1_contact.code.should == 'REGISTRAR1:test:custom:code' + + response = info_request({ id: { value: 'REGISTRAR1:test:custom:code' } }) + response[:msg].should == 'Command completed successfully' + response[:result_code].should == '1000' + + contact = response[:parsed].css('resData infData') + contact.css('ident').first.should == nil # ident should be in extension + + contact = response[:parsed].css('extension') + contact.css('ident').first.text.should == '37605030299' + end + it 'returns no authorization error for wrong user but correct password' do login_as :registrar2 do response = info_request