From 8dd44c03d44cda0f9c59d429269332ddb155ba46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20V=C3=B5hmar?= Date: Tue, 1 Dec 2015 04:38:49 +0200 Subject: [PATCH 1/7] hostAttr fix to domain:update xml_console example query --- .../xml_consoles/epp_requests/domain/update.xml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/views/registrar/xml_consoles/epp_requests/domain/update.xml b/app/views/registrar/xml_consoles/epp_requests/domain/update.xml index ad828fdb1..190939d9b 100644 --- a/app/views/registrar/xml_consoles/epp_requests/domain/update.xml +++ b/app/views/registrar/xml_consoles/epp_requests/domain/update.xml @@ -7,14 +7,20 @@ example.ee - ns1.example.com - ns2.example.com + + ns1.example.com + + + ns2.example.com + mak21 - ns1.example.com + + ns1.example.net + mak21 From 4470c679f71fe97556c271f46533ee8bb7a2bb82 Mon Sep 17 00:00:00 2001 From: Vladimir Krylov Date: Tue, 1 Dec 2015 14:46:43 +0200 Subject: [PATCH 2/7] fix clean_expired_pendings is class method, so it should call instance first (cherry picked from commit 5a112dc) --- app/models/domain.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/domain.rb b/app/models/domain.rb index 64b7ff5a6..cc35807d5 100644 --- a/app/models/domain.rb +++ b/app/models/domain.rb @@ -238,10 +238,10 @@ class Domain < ActiveRecord::Base end count += 1 if domain.pending_update? - DomainMailer.pending_update_expired_notification_for_new_registrant(id).deliver + DomainMailer.pending_update_expired_notification_for_new_registrant(domain.id).deliver end if domain.pending_delete? || domain.pending_delete_confirmation? - DomainMailer.pending_delete_expired_notification(id, deliver_emails).deliver + DomainMailer.pending_delete_expired_notification(domain.id, deliver_emails).deliver end domain.clean_pendings! unless Rails.env.test? From e9895df21109c51654db7bbf4fe8172683c37904 Mon Sep 17 00:00:00 2001 From: Stas Date: Tue, 1 Dec 2015 17:47:56 +0200 Subject: [PATCH 3/7] 109259406-punycode --- lib/tasks/convert.rake | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lib/tasks/convert.rake diff --git a/lib/tasks/convert.rake b/lib/tasks/convert.rake new file mode 100644 index 000000000..d437621c5 --- /dev/null +++ b/lib/tasks/convert.rake @@ -0,0 +1,15 @@ +namespace :convert do + desc 'Convert punycodes to unicode' + task punycode: :environment do + start = Time.zone.now.to_f + + puts "-----> Convert domain punycodes to unicode..." + + count = 0 + Domain.find_each(:batch_size => 1000) do |x| + count += 1 + x.update_column(:name_puny, (SimpleIDN.to_unicode(x.name))) + end + puts "-----> all done in #{(Time.zone.now.to_f - start).round(2)} seconds" + end +end From 7ba0b2e2ae5a509c2f50e6c1864e795775ec7059 Mon Sep 17 00:00:00 2001 From: Stas Date: Tue, 1 Dec 2015 17:51:34 +0200 Subject: [PATCH 4/7] Revert "109259406-punycode" This reverts commit e9895df21109c51654db7bbf4fe8172683c37904. --- lib/tasks/convert.rake | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 lib/tasks/convert.rake diff --git a/lib/tasks/convert.rake b/lib/tasks/convert.rake deleted file mode 100644 index d437621c5..000000000 --- a/lib/tasks/convert.rake +++ /dev/null @@ -1,15 +0,0 @@ -namespace :convert do - desc 'Convert punycodes to unicode' - task punycode: :environment do - start = Time.zone.now.to_f - - puts "-----> Convert domain punycodes to unicode..." - - count = 0 - Domain.find_each(:batch_size => 1000) do |x| - count += 1 - x.update_column(:name_puny, (SimpleIDN.to_unicode(x.name))) - end - puts "-----> all done in #{(Time.zone.now.to_f - start).round(2)} seconds" - end -end From 8bb49cdd42aa402cefac1b6f1b7fe0a90bd2b896 Mon Sep 17 00:00:00 2001 From: Stas Date: Tue, 1 Dec 2015 18:09:27 +0200 Subject: [PATCH 5/7] 109259406-name_convert --- lib/tasks/convert.rake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/tasks/convert.rake b/lib/tasks/convert.rake index d437621c5..987cdac20 100644 --- a/lib/tasks/convert.rake +++ b/lib/tasks/convert.rake @@ -4,12 +4,15 @@ namespace :convert do start = Time.zone.now.to_f puts "-----> Convert domain punycodes to unicode..." - count = 0 Domain.find_each(:batch_size => 1000) do |x| count += 1 - x.update_column(:name_puny, (SimpleIDN.to_unicode(x.name))) + old_name = x.name.strip.downcase + x.name = SimpleIDN.to_unicode(old_name) + x.name_puny = SimpleIDN.to_ascii(old_name) + x.save(validate: false) end puts "-----> all done in #{(Time.zone.now.to_f - start).round(2)} seconds" end end + From a7391427d0fc1e447b70de23ac6ca00b70560a11 Mon Sep 17 00:00:00 2001 From: Stas Date: Tue, 1 Dec 2015 20:51:39 +0200 Subject: [PATCH 6/7] 109259406-logger_added --- lib/tasks/convert.rake | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/tasks/convert.rake b/lib/tasks/convert.rake index 987cdac20..6345c9097 100644 --- a/lib/tasks/convert.rake +++ b/lib/tasks/convert.rake @@ -2,17 +2,18 @@ namespace :convert do desc 'Convert punycodes to unicode' task punycode: :environment do start = Time.zone.now.to_f - puts "-----> Convert domain punycodes to unicode..." count = 0 Domain.find_each(:batch_size => 1000) do |x| - count += 1 - old_name = x.name.strip.downcase - x.name = SimpleIDN.to_unicode(old_name) - x.name_puny = SimpleIDN.to_ascii(old_name) - x.save(validate: false) + old_name = x.name + if old_name != SimpleIDN.to_unicode(x.name.strip.downcase) + x.update_column(:name, (SimpleIDN.to_unicode(x.name.strip.downcase))) + x.update_column(:name_puny, (SimpleIDN.to_ascii(x.name.strip.downcase))) + count += 1 + puts "Domain #{x.id} changed from #{old_name} to #{SimpleIDN.to_unicode(old_name)} " + end end - puts "-----> all done in #{(Time.zone.now.to_f - start).round(2)} seconds" + puts "-----> all done in #{(Time.zone.now.to_f - start).round(2)} seconds. #{count} domains changed." end end From edbad4347c94bba599797209c75156245551a777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20V=C3=B5hmar?= Date: Tue, 1 Dec 2015 22:55:54 +0200 Subject: [PATCH 7/7] fixes to epp contact and domain doc - conflicts with schemas --- doc/epp/contact.md | 4 ++-- doc/epp/domain.md | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/epp/contact.md b/doc/epp/contact.md index b09284c36..5e45e491b 100644 --- a/doc/epp/contact.md +++ b/doc/epp/contact.md @@ -62,8 +62,8 @@ Contact Mapping protocol short version: 0-1 Country code, 2 letters uppercase, in ISO_3166-1 alpha 2 0-1 Phone number in format \+ddd.d+ 0-1 E-mail - 0-1 Required if registrar is not the owner of the contact. - 1 Contact password. Attribute: roid="String" + 0-1 Required if registrar is not the owner of the contact. + 1 Contact password. Attribute: roid="String" 0-1 0-1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd" 0-1 Contact identificator diff --git a/doc/epp/domain.md b/doc/epp/domain.md index fb03e40a4..524deee1e 100644 --- a/doc/epp/domain.md +++ b/doc/epp/domain.md @@ -19,14 +19,14 @@ Domain name mapping protocol short version: Must add up to 1 / 2 / 3 years. Attribute: unit="y/m/d" Default is 1 year. - 1 Contact reference to the registrant - 0-n Contact reference. Admin contact is required if registrant is - a juridical person. Attribute: type="admin / tech" 1 2-11 1 Hostname of the nameserver 0-2 Required if nameserver is under domain zone. Attribute ip="v4 / v6" + 1 Contact reference to the registrant + 0-n Contact reference. Admin contact is required if registrant is + a juridical person. Attribute: type="admin / tech" 1 0-1 Attribute: xmlns:secDNS="urn:ietf:params:xml:ns:secDNS-1.1" 1-n @@ -74,15 +74,15 @@ Domain name mapping protocol short version: Optional attribute: verified="yes/no" 0-1 Required if registrant is changing 0-1 Attribute: xmlns:secDNS="urn:ietf:params:xml:ns:secDNS-1.1" + 0-1 + 1-n + 1 Public key 0-1 1-n 1 Allowed values: 0, 256, 257 1 Allowed values: 3 1 Allowed values: 3, 5, 6, 7, 8, 252, 253, 254, 255 1 Public key - 0-1 - 1-n - 1 Public key 0-1 Attribute: xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd" 0-1 Base64 encoded document. Required if registrant is changing. Attribute: type="pdf/bdoc/ddoc/zip/rar/gz/tar/7z"