GithubHelp home page GithubHelp logo

internetee / registry Goto Github PK

View Code? Open in Web Editor NEW
46.0 11.0 19.0 92.24 MB

TLD Management Software

License: Other

Ruby 81.20% HTML 8.06% CoffeeScript 0.26% JavaScript 0.10% Dockerfile 0.02% Sass 0.43% SCSS 0.01% Haml 4.65% PLpgSQL 5.28%
epp registry tld domain ruby

registry's People

Contributors

artur-intech avatar dependabot[bot] avatar dinsmol avatar karlerikounapuu avatar keijoraamat avatar kritik avatar maciej-szlosarczyk avatar maricavor avatar mlensment avatar olegphenomenon avatar priidikvaikla avatar renovate-bot avatar renovate[bot] avatar teadur avatar thiagoyoussef avatar vahtel avatar vohmar avatar yulgolem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

registry's Issues

EPP: domain:delete does not fill outzone_at

successful domain:delete query leaves outzone_at blank. The delete_at field is filled and onHold status is set.

System has to fill the outzone_At with time and date the onHold status was set.

EPP: ForceDelete prohibits domain updates

ForceDelete prevents any updates to a domain object.

ForceDelete is not a status on its own - it's a group label for list of statuses:

  • serverRenewProhibited
  • serverTransferProhibited
  • serverUpdateProhibited
  • pendingDelete
  • serverManualInzone

So by default any updates are prohibited. To enable updates admin has to remove serverUpdateProhibited. Removing this results in new error on domain update

Object status prohibits operation - pendingDelete [code: 2304]

pending delete cannot prevent any other requests except domain:delete. Removing this results

Object status prohibits operation [code: 2304]

To update domain data one has to remove serverForceDelete.

Fix mailers' layout

  1. Make common layout, so that all emails look the same (cur
  2. Consider increasing font size for better accessibility.
  3. Unify subject: some are in English, some are in Estonian, some are in both.

expire emails arent sent out

When domain goes to expire status, reminder email should be sent out according to the configured
Setting.expiration_reminder_mail parameter (defaults to 2)
So by default configuration expire reminder email should be sent out once to domain owner and all administrative contacts 2 days after domain has expired.
#188

Check expire_time (domain.valid_to = domain.valid_from.utc.beginning_of_day + convert_period_to_time(domain.period, domain.period_unit) + 1.day)

Mobile-id login leads to exception at registrar/registrant portals

Nov 9 10:51:06 reg-l-rar REGISTRAR[4016]: [registrar] [855b0a24-4bf6-4fa6-b14b-a58327d7165f] [195.43.86.5] #012NoMethodError (undefined method level=' for Syslog::Logger:Class):#012 app/controllers/registrar/sessions_controller.rb:112:in mid'#12 config/initializers/eis_custom_flash.rb:9:in `call'

Check domain expiration logic

domain is set as expired when timpestamp now > valid to
domain is set on hold (removed from zone) when timestamp now > outzone at
domain is set as delete candidate and random delete time is calculated when timestamp now > delete at
domain is deleted if domain has delete candidate status set

extracted from #235

Investigate logging

STDOUT << "#{Time.zone.now.utc} DomainCron.start_expire_period: ##{domain.id} (#{domain.name}) #{domain.changes}\n" unless Rails.env.test?

WHOIS: filter bad input before query gets to db

WHOIS server cannot handle invalid input correctly

/home/whois/whois/releases/12/vendor/bundle/ruby/2.2.0/gems/activerecord-4.2.5.2/lib/active_record/connection_adapters/postgresql_adapter.rb:602:inexec_prepared': PG::CharacterNotInRepertoire: ERROR: invalid byte sequence for encoding "UTF8": 0xf6 0xf6 0x72 0x69 (ActiveRecord::StatementInvalid)`

server should validate the input so only correclty formated and valid queries reach the db

Investigate migration error

artur@registry:~/registry$ bundle exec rake db:migrate
== 20161004101419 AdduuidIndexToEppLogs: migrating ============================
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::UndefinedColumn: ERROR: column "uuid" does not exist
: CREATE INDEX CONCURRENTLY epp_logs_uuid ON epp_logs USING btree (uuid);/media/sf_registry/db/migrate/20161004101419_adduuid_index_to_epp_logs.rb:3:in change' /home/artur/.rbenv/versions/2.2.2/bin/bundle:23:inload'
/home/artur/.rbenv/versions/2.2.2/bin/bundle:23:in <main>' ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR: column "uuid" does not exist : CREATE INDEX CONCURRENTLY epp_logs_uuid ON epp_logs USING btree (uuid); /media/sf_registry/db/migrate/20161004101419_adduuid_index_to_epp_logs.rb:3:inchange'
/home/artur/.rbenv/versions/2.2.2/bin/bundle:23:in load' /home/artur/.rbenv/versions/2.2.2/bin/bundle:23:in

'
PG::UndefinedColumn: ERROR: column "uuid" does not exist
/media/sf_registry/db/migrate/20161004101419_adduuid_index_to_epp_logs.rb:3:in change' /home/artur/.rbenv/versions/2.2.2/bin/bundle:23:inload'
/home/artur/.rbenv/versions/2.2.2/bin/bundle:23:in `'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

EPP: contact_update "no errors" on contact with missing ident data

Updating contact with missing ident data generates unhandled error condition

<result code="1">
  <msg lang="en">handle_errors was executed when there were actually no errors</msg>
</result>

sample contact_info ident

    <extension>
      <eis:extdata xmlns:eis="https://epp.tld.ee/schema/eis-1.0.xsd">
        <eis:ident type="" cc=""/>
      </eis:extdata>
    </extension>

failure on update of such contact is OK, and the only solution for the registrar here is to create a new contact object, but correct error handling is necessary. An expected error message

`2306 "Parameter value policy error. Update of ident data not allowed [ident]"

timezone issues on domain expiry: expire, outzone and delete not saved in utc

domain expiration process has bugs on saving timestamps in db in correct timezone, using these values correctly according to timezone of the server/application and calculating the values of valid to, outzone and delete dates.

valid to calculated and saved in local timezone instead of utc

valid_from: "2016-10-21 11:08:18.872509"
valid_to: "2017-10-22 00:00:00"

outzone_at and delete_at dates are saved in db in local timezone instead of utc:

valid_to: "2016-11-03 22:00:00"
outzone_at: "2016-11-18 00:00:00"
delete_at: "2016-12-18 00:00:00"

due to this registrant looses 22hrs of expire warning period

logic:

  • all timestamps in db must be in UTC timezone
  • application must convert this to the timezone of the application/server (incl cron and Que jobs)
  • expire date (valid to) of a domain is set to the beginning of next day of registration according local time (ie. reg date 2016-11-04 13:15:00.000+02.00 = exp date 2016-11-05 00:00:00.00+02.00 (in db 2016-11-04 22:00:00.00+00.00)
  • outzone_at and delete_at are calculated on domain expiry
    • outzone at = valid to + expire warning period
    • delete at = valid to + expire warning period + redemption grace period
  • domain is set as expired when timpestamp now > valid to
  • domain is set on hold (removed from zone) when timestamp now > outzone at
  • domain is set as delete candidate and random delete time is calculated when timestamp now > delete at
  • domain is deleted if domain has delete candidate status set

Test case 1:

  • domain registered @ 2016-11-04 13:15 (GMT +2)
  • create/registration date saved in db 2016-11-04 11:15:00+00.00
  • expiration date saved in db 2017-11-04 22:00:00+00.00 - registration for 1 year
  • outzone date saved in db on domain expiry 2017-11-19 22:00:00+00.00
  • delete date save in db on domain expiry 2017-12-19 22.00.00+00.00
  • domain deleted at random time between 2017-12-19 22.00.00+00.00 and 2017-12-20 21:59:59+00.00

Test case 2:

  • domain registere @ 2016-11-05 01:34 (GMT +2)
  • registration date saved in db 2016-11-04 22:34:00+00.00
  • expiration date saved in db 2017-11-05 22:00:00+00.00 - registration for 1 year
  • outzone date saved in db on domain expiry 2017-11-20 22:00:00+00.00
  • delete date save in db on domain expiry 2017-12-20 22.00.00+00.00
  • domain deleted at random time between 2017-12-20 22.00.00+00.00 and 2017-12-21 21:59:59+00.00

Check mailers

The following mailers seem to be broken:

  • pending_update_rejected_notification_for_new_registrant
  • pending_update_expired_notification_for_new_registrant
  • pending_update_notification_for_new_registrant

DomainMailer.pending_update_rejected_notification_for_new_registrant(Domain.find(86902)).deliver!

ArgumentError: An SMTP To address is required to send a message
#200

Fix failing specs

 10) Domain with valid attributes should validate uniqueness of tech contacts
      Failure/Error: @domain = Fabricate(:domain)
      NoMethodError:
        undefined method `json=' for #<Whois::Record:0x007f000fc5d8a0>
      # ./app/models/whois_record.rb:115:in `update_whois_server'
      # ./app/jobs/update_whois_record_job.rb:25:in `update_domain'
      # ./app/jobs/update_whois_record_job.rb:15:in `block in run'
      # ./app/jobs/update_whois_record_job.rb:12:in `each'
      # ./app/jobs/update_whois_record_job.rb:12:in `run'
      # ./app/models/domain.rb:716:in `update_whois_record'
      # ./spec/models/domain_spec.rb:78:in `block (3 levels) in <top (required)>'
      # -e:1:in `<main>'

Remove monkey-patching

config/initializers/eis_custom_active_model.rb
config/initializers/eis_custom_active_record.rb
config/initializers/eis_custom_flash.rb

Review documentation

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.