whois.cctld.uz.rb parser crashes when expiration date is dash. #161

Merged
merged 1 commit into from May 28, 2012

Conversation

Projects
None yet
2 participants
Contributor

sherwind commented May 11, 2012

No description provided.

weppos was assigned May 11, 2012

@weppos weppos commented on an outdated diff May 20, 2012

lib/whois/record/parser/whois.cctld.uz.rb
@@ -58,7 +58,7 @@ class WhoisCctldUz < Base
property_supported :expires_on do
if content_for_scanner =~ /^Expiration Date:(.*)\n/
- Time.parse($1)
+ Time.parse($1) rescue nil
@weppos

weppos May 20, 2012

Owner

Instead of rescue nil I would suggest to use

unless $1 == '-'

In this way we are sure to let the parsing fail in case of an other different response.

Contributor

sherwind commented May 27, 2012

Sure, no problem. I've already updated the patch.

weppos merged commit 129cbd0 into weppos:master May 28, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment