From d94f700356f9263ee3718c31146dd49a4c178bf5 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 7 Mar 2022 10:32:05 +0100 Subject: [PATCH] Favicon: small improvements --- app/src/main/java/eu/faircode/email/ContactInfo.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/ContactInfo.java b/app/src/main/java/eu/faircode/email/ContactInfo.java index 4f1ef9339f..3ec17fd7d4 100644 --- a/app/src/main/java/eu/faircode/email/ContactInfo.java +++ b/app/src/main/java/eu/faircode/email/ContactInfo.java @@ -616,6 +616,8 @@ public class ContactInfo { continue; URL url = new URL(base, href); + if (!"https".equals(url.getProtocol())) + throw new FileNotFoundException(url.toString()); Log.i("GET favicon manifest " + url); HttpsURLConnection m = (HttpsURLConnection) url.openConnection(); @@ -767,7 +769,7 @@ public class ContactInfo { Log.i("GET favicon " + url); if (!"https".equals(url.getProtocol())) - throw new FileNotFoundException("http"); + throw new FileNotFoundException(url.toString()); HttpsURLConnection connection = (HttpsURLConnection) url.openConnection(); connection.setRequestMethod("GET");