Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

whois.register.com fails to parse name servers in some cases (GH-207)

  • Loading branch information...
commit 833824e25affa9d2841f3cda042a352790e7fa0e 1 parent e804656
@weppos authored
View
2  CHANGELOG.md
@@ -107,6 +107,8 @@
- FIXED: whois.nic.cz crashes when nsset node has the same ID of a contact.
+- FIXED: whois.register.com fails to parse name servers in some cases (GH-207). [Thanks @stormsilver]
+
### Backward Incompatibilities
View
2  lib/whois/record/parser/whois.register.com.rb
@@ -69,7 +69,7 @@ class WhoisRegisterCom < Base
property_supported :nameservers do
- if content_for_scanner =~ /(?:DNS|Name) Servers:\n((.+\n)+)\n/
+ if content_for_scanner =~ /(?:DNS|Name) Servers:\n((?:\s+.+\n)+)(?:\s+)\n/
$1.split("\n").map do |line|
Record::Nameserver.new(:name => line.strip)
end
View
11 ...hois.register.com/property_contacts_enom.expected → ...hois.register.com/enom/status_registered.expected
@@ -17,7 +17,7 @@
#expires_on
should: %s CLASS(time)
- should: %s == Time.parse("2013-03-14 00:19:00")
+ should: %s == Time.parse("2014-03-13 23:19:00")
#registrar
@@ -38,9 +38,10 @@
should: %s[0].city == "Iowa City"
should: %s[0].zip == "52240"
should: %s[0].state == "IA"
+ should: %s[0].country == nil
should: %s[0].country_code == "US"
should: %s[0].phone == nil
- should: %s[0].fax == nil
+ should: %s[0].fax == ""
should: %s[0].email == nil
#admin_contacts
@@ -54,9 +55,10 @@
should: %s[0].city == "Iowa City"
should: %s[0].zip == "52245"
should: %s[0].state == "IA"
+ should: %s[0].country == nil
should: %s[0].country_code == "US"
should: %s[0].phone == "+1.5152920050"
- should: %s[0].fax == nil
+ should: %s[0].fax == ""
should: %s[0].email == "domains@cramerdev.com"
#technical_contacts
@@ -70,9 +72,10 @@
should: %s[0].city == "Iowa City"
should: %s[0].zip == "52245"
should: %s[0].state == "IA"
+ should: %s[0].country == nil
should: %s[0].country_code == "US"
should: %s[0].phone == "+1.5152920050"
- should: %s[0].fax == nil
+ should: %s[0].fax == ""
should: %s[0].email == "domains@cramerdev.com"
View
182 ...ses/whois.register.com/property_contacts_enom.txt → ...ses/whois.register.com/enom/status_registered.txt
@@ -1,91 +1,91 @@
-
-The data in Register.com's WHOIS database is provided to you by
-Register.com for information purposes only, that is, to assist you in
-obtaining information about or related to a domain name registration
-record. Register.com makes this information available "as is," and
-does not guarantee its accuracy. By submitting a WHOIS query, you
-agree that you will use this data only for lawful purposes and that,
-under no circumstances will you use this data to: (1) allow, enable,
-or otherwise support the transmission of mass unsolicited, commercial
-advertising or solicitations via direct mail, electronic mail, or by
-telephone; or (2) enable high volume, automated, electronic processes
-that apply to Register.com (or its systems). The compilation,
-repackaging, dissemination or other use of this data is expressly
-prohibited without the prior written consent of Register.com.
-Register.com reserves the right to modify these terms at any time.
-By submitting this query, you agree to abide by these terms.
-
-
-=-=-=-=
-
-
-Domain name: cramerdev.com
- Is the domain you want taken? Make an offer: http://www.afternic.com/rcom.php?ref_id=2987&name=cramerdev.com
-
-Registrant Contact:
- Cramer Development
- Josh Cramer ()
-
- Fax:
- 226 S. Clinton Street
- Iowa City, IA 52240
- US
-
-Administrative Contact:
- Cramer Development Incorporated
- Host Master (domains@cramerdev.com)
- +1.5152920050
- Fax:
- 226 S Clinton St
- Iowa City, IA 52245
- US
-
-Technical Contact:
- Cramer Development Incorporated
- Host Master (domains@cramerdev.com)
- +1.5152920050
- Fax:
- 226 S Clinton St
- Iowa City, IA 52245
- US
-
-Status: Locked
-
-Name Servers:
- dns01.gpn.register.com
- dns02.gpn.register.com
- dns03.gpn.register.com
- dns04.gpn.register.com
- dns05.gpn.register.com
-
-Creation date: 14 Mar 2002 00:19:48
-Expiration date: 14 Mar 2013 00:19:00
-
-
-
-
-=-=-=-=
-The data in this whois database is provided to you for information
-purposes only, that is, to assist you in obtaining information about or
-related to a domain name registration record. We make this information
-available "as is," and do not guarantee its accuracy. By submitting a
-whois query, you agree that you will use this data only for lawful
-purposes and that, under no circumstances will you use this data to: (1)
-enable high volume, automated, electronic processes that stress or load
-this whois database system providing you this information; or (2) allow,
-enable, or otherwise support the transmission of mass unsolicited,
-commercial advertising or solicitations via direct mail, electronic
-mail, or by telephone. The compilation, repackaging, dissemination or
-other use of this data is expressly prohibited without prior written
-consent from us.
-
-We reserve the right to modify these terms at any time. By submitting
-this query, you agree to abide by these terms.
-Version 6.3 4/3/2002
-
-
-Visit AboutUs.org for more information about cramerdev.com
-
-<A HREF="http://www.aboutus.org/cramerdev.com">AboutUs: cramerdev.com</A>
-
-Register your domain name at http://www.register.com
+
+The data in Register.com's WHOIS database is provided to you by
+Register.com for information purposes only, that is, to assist you in
+obtaining information about or related to a domain name registration
+record. Register.com makes this information available "as is," and
+does not guarantee its accuracy. By submitting a WHOIS query, you
+agree that you will use this data only for lawful purposes and that,
+under no circumstances will you use this data to: (1) allow, enable,
+or otherwise support the transmission of mass unsolicited, commercial
+advertising or solicitations via direct mail, electronic mail, or by
+telephone; or (2) enable high volume, automated, electronic processes
+that apply to Register.com (or its systems). The compilation,
+repackaging, dissemination or other use of this data is expressly
+prohibited without the prior written consent of Register.com.
+Register.com reserves the right to modify these terms at any time.
+By submitting this query, you agree to abide by these terms.
+
+
+=-=-=-=
+
+
+Domain name: cramerdev.com
+ Is the domain you want taken? Make an offer: http://www.afternic.com/rcom.php?ref_id=2987&name=cramerdev.com
+
+Registrant Contact:
+ Cramer Development
+ Josh Cramer ()
+
+ Fax:
+ 226 S. Clinton Street
+ Iowa City, IA 52240
+ US
+
+Administrative Contact:
+ Cramer Development Incorporated
+ Host Master (domains@cramerdev.com)
+ +1.5152920050
+ Fax:
+ 226 S Clinton St
+ Iowa City, IA 52245
+ US
+
+Technical Contact:
+ Cramer Development Incorporated
+ Host Master (domains@cramerdev.com)
+ +1.5152920050
+ Fax:
+ 226 S Clinton St
+ Iowa City, IA 52245
+ US
+
+Status: Locked
+
+Name Servers:
+ dns01.gpn.register.com
+ dns02.gpn.register.com
+ dns03.gpn.register.com
+ dns04.gpn.register.com
+ dns05.gpn.register.com
+
+Creation date: 14 Mar 2002 00:19:48
+Expiration date: 13 Mar 2014 23:19:00
+
+
+
+
+=-=-=-=
+The data in this whois database is provided to you for information
+purposes only, that is, to assist you in obtaining information about or
+related to a domain name registration record. We make this information
+available "as is," and do not guarantee its accuracy. By submitting a
+whois query, you agree that you will use this data only for lawful
+purposes and that, under no circumstances will you use this data to: (1)
+enable high volume, automated, electronic processes that stress or load
+this whois database system providing you this information; or (2) allow,
+enable, or otherwise support the transmission of mass unsolicited,
+commercial advertising or solicitations via direct mail, electronic
+mail, or by telephone. The compilation, repackaging, dissemination or
+other use of this data is expressly prohibited without prior written
+consent from us.
+
+We reserve the right to modify these terms at any time. By submitting
+this query, you agree to abide by these terms.
+Version 6.3 4/3/2002
+
+
+Visit AboutUs.org for more information about cramerdev.com
+
+<A HREF="http://www.aboutus.org/cramerdev.com">AboutUs: cramerdev.com</A>
+
+Register your domain name at http://www.register.com
View
93 spec/fixtures/responses/whois.register.com/property_contacts_register.expected
@@ -1,93 +0,0 @@
-#status
- should: %s raise_error(Whois::PropertyNotSupported)
-
-#available?
- should: %s == false
-
-#registered?
- should: %s == true
-
-
-#created_on
- should: %s CLASS(time)
- should: %s == Time.parse("1994-11-01")
-
-#updated_on
- should: %s raise_error(Whois::PropertyNotSupported)
-
-#expires_on
- should: %s CLASS(time)
- should: %s == Time.parse("2019-08-04")
-
-
-#registrar
- should: %s CLASS(registrar)
- should: %s.id == nil
- should: %s.name == "Register.com"
- should: %s.url == "http://www.register.com/"
-
-
-#registrant_contacts
- should: %s CLASS(array)
- should: %s SIZE(1)
- should: %s[0] CLASS(contact)
- should: %s[0].type == Whois::Record::Contact::TYPE_REGISTRANT
- should: %s[0].name == "Domain Registrar"
- should: %s[0].organization == "Register.Com, Inc."
- should: %s[0].address == "575 8th Avenue"
- should: %s[0].city == "New York"
- should: %s[0].zip == "10018"
- should: %s[0].state == "NY"
- should: %s[0].country_code == "US"
- should: %s[0].phone == "+1.9027492701"
- should: %s[0].fax == nil
- should: %s[0].email == "domainregistrar@register.com"
-
-#admin_contacts
- should: %s CLASS(array)
- should: %s SIZE(1)
- should: %s[0] CLASS(contact)
- should: %s[0].type == Whois::Record::Contact::TYPE_ADMIN
- should: %s[0].name == "Domain Registrar"
- should: %s[0].organization == "Register.Com, Inc."
- should: %s[0].address == "575 8th Avenue"
- should: %s[0].city == "New York"
- should: %s[0].zip == "10018"
- should: %s[0].state == "NY"
- should: %s[0].country_code == "US"
- should: %s[0].phone == "+1.9027492701"
- should: %s[0].fax == nil
- should: %s[0].email == "domainregistrar@register.com"
-
-#technical_contacts
- should: %s CLASS(array)
- should: %s SIZE(1)
- should: %s[0] CLASS(contact)
- should: %s[0].type == Whois::Record::Contact::TYPE_TECHNICAL
- should: %s[0].name == "Domain Registrar"
- should: %s[0].organization == "Register.Com, Inc."
- should: %s[0].address == "575 8th Avenue"
- should: %s[0].city == "New York"
- should: %s[0].zip == "10018"
- should: %s[0].state == "NY"
- should: %s[0].country_code == "US"
- should: %s[0].phone == "+1.9027492701"
- should: %s[0].fax == nil
- should: %s[0].email == "domainregistrar@register.com"
-
-
-#nameservers
- should: %s CLASS(array)
- should: %s SIZE(6)
- should: %s[0] CLASS(nameserver)
- should: %s[0].name == "ns2.register.com"
- should: %s[1] CLASS(nameserver)
- should: %s[1].name == "ns3.register.com"
- should: %s[2] CLASS(nameserver)
- should: %s[2].name == "ns4.register.com"
- should: %s[3] CLASS(nameserver)
- should: %s[3].name == "ns5.register.com"
- should: %s[4] CLASS(nameserver)
- should: %s[4].name == "ns6.register.com"
- should: %s[5] CLASS(nameserver)
- should: %s[5].name == "ns1.register.com"
View
73 spec/fixtures/responses/whois.register.com/property_contacts_register.txt
@@ -1,73 +0,0 @@
-
-The data in Register.com's WHOIS database is provided to you by
-Register.com for information purposes only, that is, to assist you in
-obtaining information about or related to a domain name registration
-record. Register.com makes this information available "as is," and
-does not guarantee its accuracy. By submitting a WHOIS query, you
-agree that you will use this data only for lawful purposes and that,
-under no circumstances will you use this data to: (1) allow, enable,
-or otherwise support the transmission of mass unsolicited, commercial
-advertising or solicitations via direct mail, electronic mail, or by
-telephone; or (2) enable high volume, automated, electronic processes
-that apply to Register.com (or its systems). The compilation,
-repackaging, dissemination or other use of this data is expressly
-prohibited without the prior written consent of Register.com.
-Register.com reserves the right to modify these terms at any time.
-By submitting this query, you agree to abide by these terms.
-
-
- Registrant:
- Register.Com, Inc.
- Domain Registrar
- 575 8th Avenue
- New York, NY 10018
- US
- Phone: +1.9027492701
- Email: domainregistrar@register.com
-
-
-
- Registrar Name....: Register.com
- Registrar Whois...: whois.register.com
- Registrar Homepage: www.register.com
-
- Domain Name: register.com
- Created on..............: 1994-11-01
- Expires on..............: 2019-08-04
-
- Administrative Contact:
- Register.Com, Inc.
- Domain Registrar
- 575 8th Avenue
- New York, NY 10018
- US
- Phone: +1.9027492701
- Email: domainregistrar@register.com
-
-
- Technical Contact:
- Register.Com, Inc.
- Domain Registrar
- 575 8th Avenue
- New York, NY 10018
- US
- Phone: +1.9027492701
- Email: domainregistrar@register.com
-
-
- DNS Servers:
- ns2.register.com
- ns3.register.com
- ns4.register.com
- ns5.register.com
- ns6.register.com
- ns1.register.com
-
-
-
-Visit AboutUs.org for more information about register.com
-
-<A HREF="http://www.aboutus.org/register.com">AboutUs: register.com</A>
-
-Register your domain name at http://www.register.com
-
View
0  ...ses/whois.register.com/status_registered.expected → ....register.com/register/status_registered.expected
File renamed without changes
View
0  ...esponses/whois.register.com/status_registered.txt → ...whois.register.com/register/status_registered.txt
File renamed without changes
View
17 ...whois.register.com/property_contacts_enom_spec.rb → ...whois.register.com/enom/status_registered_spec.rb
@@ -3,7 +3,7 @@
# This file is autogenerated. Do not edit it manually.
# If you want change the content of this file, edit
#
-# /spec/fixtures/responses/whois.register.com/property_contacts_enom.expected
+# /spec/fixtures/responses/whois.register.com/enom/status_registered.expected
#
# and regenerate the tests with the following rake task
#
@@ -13,10 +13,10 @@
require 'spec_helper'
require 'whois/record/parser/whois.register.com.rb'
-describe Whois::Record::Parser::WhoisRegisterCom, "property_contacts_enom.expected" do
+describe Whois::Record::Parser::WhoisRegisterCom, "status_registered.expected" do
subject do
- file = fixture("responses", "whois.register.com/property_contacts_enom.txt")
+ file = fixture("responses", "whois.register.com/enom/status_registered.txt")
part = Whois::Record::Part.new(:body => File.read(file))
described_class.new(part)
end
@@ -50,7 +50,7 @@
describe "#expires_on" do
it do
subject.expires_on.should be_a(Time)
- subject.expires_on.should == Time.parse("2013-03-14 00:19:00")
+ subject.expires_on.should == Time.parse("2014-03-13 23:19:00")
end
end
describe "#registrar" do
@@ -73,9 +73,10 @@
subject.registrant_contacts[0].city.should == "Iowa City"
subject.registrant_contacts[0].zip.should == "52240"
subject.registrant_contacts[0].state.should == "IA"
+ subject.registrant_contacts[0].country.should == nil
subject.registrant_contacts[0].country_code.should == "US"
subject.registrant_contacts[0].phone.should == nil
- subject.registrant_contacts[0].fax.should == nil
+ subject.registrant_contacts[0].fax.should == ""
subject.registrant_contacts[0].email.should == nil
end
end
@@ -91,9 +92,10 @@
subject.admin_contacts[0].city.should == "Iowa City"
subject.admin_contacts[0].zip.should == "52245"
subject.admin_contacts[0].state.should == "IA"
+ subject.admin_contacts[0].country.should == nil
subject.admin_contacts[0].country_code.should == "US"
subject.admin_contacts[0].phone.should == "+1.5152920050"
- subject.admin_contacts[0].fax.should == nil
+ subject.admin_contacts[0].fax.should == ""
subject.admin_contacts[0].email.should == "domains@cramerdev.com"
end
end
@@ -109,9 +111,10 @@
subject.technical_contacts[0].city.should == "Iowa City"
subject.technical_contacts[0].zip.should == "52245"
subject.technical_contacts[0].state.should == "IA"
+ subject.technical_contacts[0].country.should == nil
subject.technical_contacts[0].country_code.should == "US"
subject.technical_contacts[0].phone.should == "+1.5152920050"
- subject.technical_contacts[0].fax.should == nil
+ subject.technical_contacts[0].fax.should == ""
subject.technical_contacts[0].email.should == "domains@cramerdev.com"
end
end
View
136 spec/whois/record/parser/responses/whois.register.com/property_contacts_register_spec.rb
@@ -1,136 +0,0 @@
-# encoding: utf-8
-
-# This file is autogenerated. Do not edit it manually.
-# If you want change the content of this file, edit
-#
-# /spec/fixtures/responses/whois.register.com/property_contacts_register.expected
-#
-# and regenerate the tests with the following rake task
-#
-# $ rake spec:generate
-#
-
-require 'spec_helper'
-require 'whois/record/parser/whois.register.com.rb'
-
-describe Whois::Record::Parser::WhoisRegisterCom, "property_contacts_register.expected" do
-
- subject do
- file = fixture("responses", "whois.register.com/property_contacts_register.txt")
- part = Whois::Record::Part.new(:body => File.read(file))
- described_class.new(part)
- end
-
- describe "#status" do
- it do
- lambda { subject.status }.should raise_error(Whois::PropertyNotSupported)
- end
- end
- describe "#available?" do
- it do
- subject.available?.should == false
- end
- end
- describe "#registered?" do
- it do
- subject.registered?.should == true
- end
- end
- describe "#created_on" do
- it do
- subject.created_on.should be_a(Time)
- subject.created_on.should == Time.parse("1994-11-01")
- end
- end
- describe "#updated_on" do
- it do
- lambda { subject.updated_on }.should raise_error(Whois::PropertyNotSupported)
- end
- end
- describe "#expires_on" do
- it do
- subject.expires_on.should be_a(Time)
- subject.expires_on.should == Time.parse("2019-08-04")
- end
- end
- describe "#registrar" do
- it do
- subject.registrar.should be_a(Whois::Record::Registrar)
- subject.registrar.id.should == nil
- subject.registrar.name.should == "Register.com"
- subject.registrar.url.should == "http://www.register.com/"
- end
- end
- describe "#registrant_contacts" do
- it do
- subject.registrant_contacts.should be_a(Array)
- subject.registrant_contacts.should have(1).items
- subject.registrant_contacts[0].should be_a(Whois::Record::Contact)
- subject.registrant_contacts[0].type.should == Whois::Record::Contact::TYPE_REGISTRANT
- subject.registrant_contacts[0].name.should == "Domain Registrar"
- subject.registrant_contacts[0].organization.should == "Register.Com, Inc."
- subject.registrant_contacts[0].address.should == "575 8th Avenue"
- subject.registrant_contacts[0].city.should == "New York"
- subject.registrant_contacts[0].zip.should == "10018"
- subject.registrant_contacts[0].state.should == "NY"
- subject.registrant_contacts[0].country_code.should == "US"
- subject.registrant_contacts[0].phone.should == "+1.9027492701"
- subject.registrant_contacts[0].fax.should == nil
- subject.registrant_contacts[0].email.should == "domainregistrar@register.com"
- end
- end
- describe "#admin_contacts" do
- it do
- subject.admin_contacts.should be_a(Array)
- subject.admin_contacts.should have(1).items
- subject.admin_contacts[0].should be_a(Whois::Record::Contact)
- subject.admin_contacts[0].type.should == Whois::Record::Contact::TYPE_ADMIN
- subject.admin_contacts[0].name.should == "Domain Registrar"
- subject.admin_contacts[0].organization.should == "Register.Com, Inc."
- subject.admin_contacts[0].address.should == "575 8th Avenue"
- subject.admin_contacts[0].city.should == "New York"
- subject.admin_contacts[0].zip.should == "10018"
- subject.admin_contacts[0].state.should == "NY"
- subject.admin_contacts[0].country_code.should == "US"
- subject.admin_contacts[0].phone.should == "+1.9027492701"
- subject.admin_contacts[0].fax.should == nil
- subject.admin_contacts[0].email.should == "domainregistrar@register.com"
- end
- end
- describe "#technical_contacts" do
- it do
- subject.technical_contacts.should be_a(Array)
- subject.technical_contacts.should have(1).items
- subject.technical_contacts[0].should be_a(Whois::Record::Contact)
- subject.technical_contacts[0].type.should == Whois::Record::Contact::TYPE_TECHNICAL
- subject.technical_contacts[0].name.should == "Domain Registrar"
- subject.technical_contacts[0].organization.should == "Register.Com, Inc."
- subject.technical_contacts[0].address.should == "575 8th Avenue"
- subject.technical_contacts[0].city.should == "New York"
- subject.technical_contacts[0].zip.should == "10018"
- subject.technical_contacts[0].state.should == "NY"
- subject.technical_contacts[0].country_code.should == "US"
- subject.technical_contacts[0].phone.should == "+1.9027492701"
- subject.technical_contacts[0].fax.should == nil
- subject.technical_contacts[0].email.should == "domainregistrar@register.com"
- end
- end
- describe "#nameservers" do
- it do
- subject.nameservers.should be_a(Array)
- subject.nameservers.should have(6).items
- subject.nameservers[0].should be_a(Whois::Record::Nameserver)
- subject.nameservers[0].name.should == "ns2.register.com"
- subject.nameservers[1].should be_a(Whois::Record::Nameserver)
- subject.nameservers[1].name.should == "ns3.register.com"
- subject.nameservers[2].should be_a(Whois::Record::Nameserver)
- subject.nameservers[2].name.should == "ns4.register.com"
- subject.nameservers[3].should be_a(Whois::Record::Nameserver)
- subject.nameservers[3].name.should == "ns5.register.com"
- subject.nameservers[4].should be_a(Whois::Record::Nameserver)
- subject.nameservers[4].name.should == "ns6.register.com"
- subject.nameservers[5].should be_a(Whois::Record::Nameserver)
- subject.nameservers[5].name.should == "ns1.register.com"
- end
- end
-end
View
4 ...nses/whois.register.com/status_registered_spec.rb → ...s.register.com/register/status_registered_spec.rb
@@ -3,7 +3,7 @@
# This file is autogenerated. Do not edit it manually.
# If you want change the content of this file, edit
#
-# /spec/fixtures/responses/whois.register.com/status_registered.expected
+# /spec/fixtures/responses/whois.register.com/register/status_registered.expected
#
# and regenerate the tests with the following rake task
#
@@ -16,7 +16,7 @@
describe Whois::Record::Parser::WhoisRegisterCom, "status_registered.expected" do
subject do
- file = fixture("responses", "whois.register.com/status_registered.txt")
+ file = fixture("responses", "whois.register.com/register/status_registered.txt")
part = Whois::Record::Part.new(:body => File.read(file))
described_class.new(part)
end
Please sign in to comment.
Something went wrong with that request. Please try again.