whats_next: when there are multiple responses like for NS records sort the responses so we can compare to a fixed order

This commit is contained in:
Joshua Tauberer 2014-08-17 19:55:03 +00:00
parent f299825a95
commit 919a5a8f0b
1 changed files with 3 additions and 2 deletions

View File

@ -248,8 +248,9 @@ def query_dns(qname, rtype, nxdomain='[Not Set]'):
# There may be multiple answers; concatenate the response. Remove trailing
# periods from responses since that's how qnames are encoded in DNS but is
# confusing for us.
return "; ".join(str(r).rstrip('.') for r in response)
# confusing for us. The order of the answers doesn't matter, so sort so we
# can compare to a well known order.
return "; ".join(sorted(str(r).rstrip('.') for r in response))
def check_ssl_cert(domain, env):
# Check that SSL certificate is signed.