Skip to content

Commit

Permalink
lowercase hostnames and rdns from inception
Browse files Browse the repository at this point in the history
  • Loading branch information
furlongm committed Jan 31, 2019
1 parent 1a501cf commit 107293f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion patchman/hosts/utils.py
Expand Up @@ -31,7 +31,7 @@ def update_rdns(host):
except (gaierror, herror):
reversedns = 'None'

host.reversedns = reversedns
host.reversedns = reversedns.lower()
try:
host.save()
except DatabaseError as e:
Expand Down
1 change: 1 addition & 0 deletions patchman/reports/models.py
Expand Up @@ -75,6 +75,7 @@ def parse(self, data, meta):
setattr(self, attr, data.get(attr))

if self.host is not None:
self.host = self.host.lower()
fqdn = self.host.split('.', 1)
if len(fqdn) == 2:
self.domain = fqdn.pop()
Expand Down

0 comments on commit 107293f

Please sign in to comment.