diff --git a/CHANGELOG.md b/CHANGELOG.md
index 24ffb7787..9711c3ed1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+08.07.2021
+* improved contact name validation [#1795](https://github.com/internetee/registry/issues/1795)
+* orphaned poll messages are automatically dequed [#2026](https://github.com/internetee/registry/issues/2026)
+* fixed registrant change with force delete set [#2077](https://github.com/internetee/registry/issues/2077)
+
06.07.2021
* admin dropdown filter ui fix [#2065](https://github.com/internetee/registry/issues/2065)
* Bump truemail to 2.4.4 [#2071](https://github.com/internetee/registry/pull/2071)
diff --git a/Gemfile.lock b/Gemfile.lock
index 68ab07153..e9b374616 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -115,7 +115,7 @@ GEM
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
- active_interaction (4.0.4)
+ active_interaction (4.0.5)
activemodel (>= 5, < 7)
activesupport (>= 5, < 7)
activejob (6.1.4)
@@ -139,7 +139,7 @@ GEM
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
- addressable (2.7.0)
+ addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
aes_key_wrap (1.1.0)
airbrake (11.0.3)
@@ -205,7 +205,7 @@ GEM
daemons-rails (1.2.1)
daemons
multi_json (~> 1.0)
- data_migrate (7.0.1)
+ data_migrate (7.0.2)
activerecord (>= 5.0)
railties (>= 5.0)
database_cleaner (2.0.1)
@@ -387,7 +387,7 @@ GEM
method_source
rake (>= 0.13)
thor (~> 1.0)
- rake (13.0.3)
+ rake (13.0.6)
ransack (2.4.2)
activerecord (>= 5.2.4)
activesupport (>= 5.2.4)
@@ -463,7 +463,7 @@ GEM
temple (0.8.2)
thor (1.1.0)
tilt (2.0.10)
- truemail (2.4.4)
+ truemail (2.4.6)
simpleidn (~> 0.2.1)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
diff --git a/app/controllers/epp/polls_controller.rb b/app/controllers/epp/polls_controller.rb
index 86218336b..01cb719c4 100644
--- a/app/controllers/epp/polls_controller.rb
+++ b/app/controllers/epp/polls_controller.rb
@@ -27,6 +27,7 @@ module Epp
Rails.logger.error 'orphan message, error ignored: ' + problem.to_s
# now we should dequeue or delete the messages avoid duplicate log alarms
+ @notification.mark_as_read
end
end
diff --git a/app/views/admin/epp_logs/index.haml b/app/views/admin/epp_logs/index.haml
index 29493d3f7..33ba4f96f 100644
--- a/app/views/admin/epp_logs/index.haml
+++ b/app/views/admin/epp_logs/index.haml
@@ -14,7 +14,7 @@
- opts = [[t(:choose),''], 'contact', 'domain', 'poll']
- opts += [params[:q][:request_object_cont]] if params[:q].present? && params[:q][:request_object_cont].present?
= f.label :request_object
- = f.select :request_object_cont, opts, {}, class: 'form-control js-combobox', placeholder: t(:choose)
+ = f.select :request_object_cont, opts, {}, class: 'form-control selectize_create', placeholder: t(:choose)
.col-md-3
.form-group
= f.label :request_successful
diff --git a/test/integration/epp/domain/update/base_test.rb b/test/integration/epp/domain/update/base_test.rb
index 644619644..bff325307 100644
--- a/test/integration/epp/domain/update/base_test.rb
+++ b/test/integration/epp/domain/update/base_test.rb
@@ -588,6 +588,50 @@ class EppDomainUpdateBaseTest < EppTestCase
assert_no_emails
end
+ def test_makes_update_if_was_forcedelete
+ contact = @domain.contacts.first
+ contact.update_attribute(:email, '`@outlook.test')
+ contact.email_verification.verify
+ assert contact.email_verification_failed?
+ @domain.reload
+ assert @domain.force_delete_scheduled?
+
+ @domain.update_attribute(:statuses_before_force_delete, nil)
+
+ Setting.request_confirmation_on_registrant_change_enabled = true
+ new_registrant = contacts(:william).becomes(Registrant)
+ assert_not_equal new_registrant, @domain.registrant
+
+ request_xml = <<-XML
+
+
+
+
+
+ #{@domain.name}
+
+ #{new_registrant.code}
+
+
+
+
+
+ #{'test' * 2000}
+
+
+
+
+ XML
+
+ post epp_update_path, params: { frame: request_xml },
+ headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
+ @domain.reload
+
+ response_xml = Nokogiri::XML(response.body)
+ assert_correct_against_schema response_xml
+ assert_epp_response :completed_successfully
+ end
+
def test_clears_force_delete_when_registrar_changed
Setting.request_confirmation_on_registrant_change_enabled = true
new_registrant = contacts(:william).becomes(Registrant)
diff --git a/test/integration/epp/poll_test.rb b/test/integration/epp/poll_test.rb
index 5cdb7e524..e3fbb0daf 100644
--- a/test/integration/epp/poll_test.rb
+++ b/test/integration/epp/poll_test.rb
@@ -26,6 +26,31 @@ class EppPollTest < EppTestCase
assert_equal 'Your domain has been updated', xml_doc.at_css('msgQ msg').text
end
+ def test_clears_orphan_messages_if_any
+ # To check if we are clearing orphan messages we need to create a message not linked to any
+ # existing Epp::Domain
+
+ orphan_notification = @notification.dup
+ orphan_notification.attached_obj_type = Epp::Domain
+ orphan_notification.attached_obj_id = rand(Epp::Domain.first.id-1)
+ orphan_notification.save!
+ assert orphan_notification.unread?
+
+ request_xml = <<-XML
+
+
+
+
+
+
+ XML
+ post epp_poll_path, params: { frame: request_xml },
+ headers: { 'HTTP_COOKIE' => 'session=api_bestnames' }
+
+ orphan_notification.reload
+ refute orphan_notification.unread?
+ end
+
def test_does_not_drop_error_if_old_version
version = Version::DomainVersion.last
@notification.update(attached_obj_type: 'DomainVersion', attached_obj_id: version.id)