1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-27 10:17:18 +00:00

Rewrite Google non-com redirects

This commit is contained in:
M66B 2022-01-04 19:03:21 +01:00
parent 3863ac8757
commit 61c0f733cf

View file

@ -237,6 +237,14 @@ public class UriHelper {
p = u.indexOf("/");
}
changed = (result != null);
url = (result == null ? uri : result);
} else if ("https".equals(uri.getScheme()) &&
uri.getHost() != null &&
uri.getHost().startsWith("www.google.") &&
uri.getQueryParameter("url") != null) {
// Google non-com redirects
Uri result = Uri.parse(uri.getQueryParameter("url"));
changed = (result != null);
url = (result == null ? uri : result);
} else if (uri.getQueryParameterNames().size() == 1) {