Workaround yahoo unsafe redirects

pull/199/head
M66B 4 years ago
parent 0b29f65e26
commit 6eab26c15d

@ -354,11 +354,17 @@ public class ContactInfo {
String domain = UriHelper.getEmailDomain(info.email);
if (domain != null) {
// Prevent using Doodles
if ("google.com".equals(domain) ||
"gmail.com".equals(domain) ||
"googlemail.com".equals(domain))
domain = "support.google.com";
// https://yahoo.fr redirect unsafely to http://fr.yahoo.com/favicon.ico
String[] d = domain.split("\\.");
if (d.length > 1 && "yahoo".equals(d[d.length - 2]))
domain = "yahoo.com";
File dir = new File(context.getCacheDir(), "favicons");
if (!dir.exists())
dir.mkdir();

Loading…
Cancel
Save