From 97fc68e5006a6885de936b47ecd8c98d06d2abfc Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 17 Jul 2024 17:38:03 +0200 Subject: [PATCH] Unbounce redirect URIs --- app/src/main/java/eu/faircode/email/UriHelper.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/UriHelper.java b/app/src/main/java/eu/faircode/email/UriHelper.java index a99f99d411..8d4694c09a 100644 --- a/app/src/main/java/eu/faircode/email/UriHelper.java +++ b/app/src/main/java/eu/faircode/email/UriHelper.java @@ -341,6 +341,18 @@ public class UriHelper { } else { Uri result = getBraveDebounce(context, uri); + if (result == null && + uri.getQueryParameter("redirect") != null) { + Uri redirected = Uri.parse(uri.getQueryParameter("redirect")); + if (redirected != null) { + Uri.Builder builder = redirected.buildUpon(); + for (String key : uri.getQueryParameterNames()) + if (!"redirect".equals(key)) + builder.appendQueryParameter(key, uri.getQueryParameter(key)); + result = builder.build(); + } + } + if (result == null && uri.getQueryParameter("redirectUrl") != null) // https://.../link-tracker?redirectUrl=&sig=...&iat=...&a=...&account=...&email=...&s=...&i=...