collectiveintel/cif-v1 — pull request #70 by rtkpmcalpine (2014-04-28 13:22:38+00:00)
Title: Fix error for hostname starting with IPv4 address

Hostname queries for non-IPv4 subjects which match an IP address were
causing 500 errors from the CIF API. This change updates the regex test
to be more specific in determining if the query should be treated as an
IPv4 address or a hostname.

Example hostname which would cause an error: 1.2.3.4.mydomain.com

Tested: Perform queries of:
- hostname prefaced with an IPv4 address
- CIDR address
- IPv4 address
Confirmed CIDR and IPv4 addresses were matched by updated regex.