PSL refactoring

This commit is contained in:
M66B
2022-05-02 09:55:27 +02:00
parent 682acc879b
commit 65bf57094d
9 changed files with 70 additions and 48 deletions

View File

@@ -92,7 +92,7 @@ public class Bimi {
DnsHelper.DnsRecord record = lookupBimi(context, selector, domain);
if (record == null) {
String parent = UriHelper.getParentDomain(context, domain);
if (domain.equals(parent))
if (parent == null)
return null;
domain = parent;
record = lookupBimi(context, selector, domain);
@@ -328,7 +328,7 @@ public class Bimi {
DnsHelper.DnsRecord[] records = DnsHelper.lookup(context, txt, "txt");
if (records.length == 0) {
String parent = UriHelper.getParentDomain(context, domain);
if (!domain.equals(parent)) {
if (parent != null) {
txt = "_dmarc." + parent;
records = DnsHelper.lookup(context, txt, "txt");
}