diff --git a/src/diagnosers/14-ports.py b/src/diagnosers/14-ports.py index 1e265f78e..0cd54efba 100644 --- a/src/diagnosers/14-ports.py +++ b/src/diagnosers/14-ports.py @@ -47,7 +47,7 @@ class MyDiagnoser(Diagnoser): ipversions = [] ipv4 = Diagnoser.get_cached_report("ip", item={"test": "ipv4"}) or {} - if ipv4.get("status") == "SUCCESS" or settings_get(misc.network.dns_exposure") != "ipv6": + if ipv4.get("status") == "SUCCESS" or settings_get("misc.network.dns_exposure") != "ipv6": ipversions.append(4) # To be discussed: we could also make this check dependent on the @@ -121,7 +121,7 @@ class MyDiagnoser(Diagnoser): for record in dnsrecords.get("items", []) ) - if failed == 4 and settings_get(misc.network.dns_exposure") != "ipv6" or ipv6_is_important(): + if failed == 4 and settings_get("misc.network.dns_exposure") != "ipv6" or ipv6_is_important(): yield dict( meta={"port": port}, data={ diff --git a/src/diagnosers/21-web.py b/src/diagnosers/21-web.py index 2024cf6ce..74e3ca483 100644 --- a/src/diagnosers/21-web.py +++ b/src/diagnosers/21-web.py @@ -77,7 +77,7 @@ class MyDiagnoser(Diagnoser): ipversions = [] ipv4 = Diagnoser.get_cached_report("ip", item={"test": "ipv4"}) or {} - if ipv4.get("status") == "SUCCESS" and settings_get(misc.network.dns_exposure") != "ipv6": + if ipv4.get("status") == "SUCCESS" and settings_get("misc.network.dns_exposure") != "ipv6": ipversions.append(4) # To be discussed: we could also make this check dependent on the @@ -97,7 +97,7 @@ class MyDiagnoser(Diagnoser): # "curl --head the.global.ip" will simply timeout... if self.do_hairpinning_test: global_ipv4 = ipv4.get("data", {}).get("global", None) - if global_ipv4 and settings_get(misc.network.dns_exposure") != "ipv6": + if global_ipv4 and settings_get("misc.network.dns_exposure") != "ipv6": try: requests.head("http://" + global_ipv4, timeout=5) except requests.exceptions.Timeout: @@ -148,7 +148,7 @@ class MyDiagnoser(Diagnoser): if all( results[ipversion][domain]["status"] == "ok" for ipversion in ipversions ): - if 4 in ipversions and settings_get(misc.network.dns_exposure") != "ipv6": + if 4 in ipversions and settings_get("misc.network.dns_exposure") != "ipv6": self.do_hairpinning_test = True yield dict( meta={"domain": domain}, @@ -186,7 +186,7 @@ class MyDiagnoser(Diagnoser): ) AAAA_status = dnsrecords.get("data", {}).get("AAAA:@") - return AAAA_status in ["OK", "WRONG"] or settings_get(misc.network.dns_exposure") != "ipv4" + return AAAA_status in ["OK", "WRONG"] or settings_get("misc.network.dns_exposure") != "ipv4" if failed == 4 or ipv6_is_important_for_this_domain(): yield dict( diff --git a/src/diagnosers/24-mail.py b/src/diagnosers/24-mail.py index 590b0d9ba..283f80681 100644 --- a/src/diagnosers/24-mail.py +++ b/src/diagnosers/24-mail.py @@ -302,13 +302,13 @@ class MyDiagnoser(Diagnoser): outgoing_ipversions = [] outgoing_ips = [] ipv4 = Diagnoser.get_cached_report("ip", {"test": "ipv4"}) or {} - if ipv4.get("status") == "SUCCESS" and settings_get(misc.network.dns_exposure") != "ipv6": + if ipv4.get("status") == "SUCCESS" and settings_get("misc.network.dns_exposure") != "ipv6": outgoing_ipversions.append(4) global_ipv4 = ipv4.get("data", {}).get("global", {}) if global_ipv4: outgoing_ips.append(global_ipv4) - if settings_get("email.smtp.smtp_allow_ipv6") or settings_get(misc.network.dns_exposure") != "ipv4": + if settings_get("email.smtp.smtp_allow_ipv6") or settings_get("misc.network.dns_exposure") != "ipv4": ipv6 = Diagnoser.get_cached_report("ip", {"test": "ipv6"}) or {} if ipv6.get("status") == "SUCCESS": outgoing_ipversions.append(6)