BIMI requires secure connections

This commit is contained in:
M66B 2021-10-11 20:36:57 +02:00
parent 9792d1dcb8
commit faa71279e4
1 changed files with 13 additions and 0 deletions

View File

@ -22,6 +22,7 @@ package eu.faircode.email;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Pair;
@ -122,6 +123,12 @@ public class Bimi {
if (TextUtils.isEmpty(l))
continue;
Uri ul = Uri.parse(l);
if (!"https".equals(ul.getScheme())) {
Log.e("BIMI insecure img=" + l);
continue;
}
URL url = new URL(l);
Log.i("BIMI favicon " + url);
@ -152,6 +159,12 @@ public class Bimi {
if (TextUtils.isEmpty(a))
continue;
Uri ua = Uri.parse(a);
if (!"https".equals(ua.getScheme())) {
Log.e("BIMI insecure pem=" + a);
continue;
}
try {
URL url = new URL(a);
Log.i("BIMI PEM " + url);