Check block list host names

master
M66B 3 weeks ago
parent 668f4950b5
commit 138617b350

@ -25,6 +25,7 @@ import android.net.Uri;
import android.text.TextUtils;
import androidx.core.net.MailTo;
import androidx.core.util.PatternsCompat;
import androidx.preference.PreferenceManager;
import java.net.Inet4Address;
@ -165,6 +166,8 @@ public class DnsBlockList {
boolean numeric = host.startsWith("[") && host.endsWith("]");
if (numeric)
host = host.substring(1, host.length() - 1);
else if (!PatternsCompat.DOMAIN_NAME.matcher(host).matches())
return null;
return isJunk(context, host, true, BLOCK_LISTS);
}

Loading…
Cancel
Save