Commit 919a5a8f authored by Joshua Tauberer's avatar Joshua Tauberer

whats_next: when there are multiple responses like for NS records sort the...

whats_next: when there are multiple responses like for NS records sort the responses so we can compare to a fixed order
parent f299825a
...@@ -248,8 +248,9 @@ def query_dns(qname, rtype, nxdomain='[Not Set]'): ...@@ -248,8 +248,9 @@ def query_dns(qname, rtype, nxdomain='[Not Set]'):
# There may be multiple answers; concatenate the response. Remove trailing # There may be multiple answers; concatenate the response. Remove trailing
# periods from responses since that's how qnames are encoded in DNS but is # periods from responses since that's how qnames are encoded in DNS but is
# confusing for us. # confusing for us. The order of the answers doesn't matter, so sort so we
return "; ".join(str(r).rstrip('.') for r in response) # can compare to a well known order.
return "; ".join(sorted(str(r).rstrip('.') for r in response))
def check_ssl_cert(domain, env): def check_ssl_cert(domain, env):
# Check that SSL certificate is signed. # Check that SSL certificate is signed.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment