mirror of https://github.com/M66B/FairEmail.git
Process redirectUrl in links
This commit is contained in:
parent
054d827bce
commit
baef6153c3
|
@ -297,6 +297,18 @@ public class UriHelper {
|
|||
|
||||
changed = (result != null);
|
||||
url = (result == null ? uri : result);
|
||||
} else if (uri.getQueryParameter("redirectUrl") != null) {
|
||||
// https://.../link-tracker?redirectUrl=<base64>&sig=...&iat=...&a=...&account=...&email=...&s=...&i=...
|
||||
try {
|
||||
byte[] bytes = Base64.decode(uri.getQueryParameter("redirectUrl"), 0);
|
||||
String u = URLDecoder.decode(new String(bytes), StandardCharsets.UTF_8.name());
|
||||
Uri result = Uri.parse(u);
|
||||
changed = (result != null);
|
||||
url = (result == null ? uri : result);
|
||||
} catch (Throwable ex) {
|
||||
Log.i(ex);
|
||||
url = uri;
|
||||
}
|
||||
} else
|
||||
url = uri;
|
||||
|
||||
|
|
Loading…
Reference in New Issue