Permalink
Browse files

The whois.pnina.ps server injects a NODNS.NS string when a nameserver…

… is not set. The parser should ignore it.
  • Loading branch information...
1 parent b13b540 commit c15fae357263e56ee59613f167bf19df97799fa3 @weppos committed Nov 23, 2010
View
@@ -4,6 +4,8 @@
* FIXED: With some .pl domains, whois.dns.pl parser returns invalid values for nameservers.
+* FIXED: The whois.pnina.ps server injects a NODNS.NS string when a nameserver is not set. The parser should ignore it.
+
== Release 1.6.3
@@ -73,7 +73,7 @@ class WhoisPninaPs < Base
property_supported :nameservers do
@nameservers ||= if content_for_scanner =~ /Name Servers:\n((.+\n)+)\n/
- $1.split("\n").map(&:strip)
+ $1.split("\n").map { |value| value.strip.downcase }.delete_if { |value| value =~ /nodns\.ns$/ }
else
[]
end
@@ -0,0 +1,19 @@
+TERMS OF USE: You are not authorized to access or query our Whois database through the use of electronic processes that are high-volume and automated. Whois database is provided by PNINA as a service to the internet community on behalf of PNINA members. (http://www.pnina.ps/)
+
+The data is for information purposes only. PNINA does not guarantee its accuracy. By submitting a Whois query, you agree to abide by the following terms of use: You agree that you may 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 e-mail, telephone, or facsimile; or (2) enable high volume, automated, electronic processes that apply to PNINA and it's registrars (or PNINA or registrars computer systems). The compilation, repackaging, dissemination or other use of this Data is expressly prohibited.
+
+Domain Information
+Query: pnn.ps
+Status: Active
+Created: 11 May 2005
+Expires: 11 May 2020
+Name Servers:
+ ns1.pnn-ps.com
+ NODNS2.NODNS.NS
+
+Registrar Information
+Registrar Name: hadara
+
+
+
+
@@ -88,4 +88,11 @@ def test_nameservers
assert_equal expected, parser.instance_eval { @nameservers }
end
+ def test_nameservers_with_nodns
+ parser = @klass.new(load_part('/property_nameservers_with_nodns.txt'))
+ expected = %w( ns1.pnn-ps.com )
+ assert_equal expected, parser.nameservers
+ assert_equal expected, parser.instance_eval { @nameservers }
+ end
+
end

0 comments on commit c15fae3

Please sign in to comment.