mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-26 10:55:09 +01:00
Decode DHL/NL links
This commit is contained in:
@@ -330,6 +330,18 @@ public class UriHelper {
|
||||
Uri result = (s > 0 ? Uri.parse(path.substring(s + 1)) : null);
|
||||
changed = (result != null);
|
||||
url = (result == null ? uri : result);
|
||||
} else if (uri.getHost() != null && uri.getHost().equals("go.dhlparcel.nl")) {
|
||||
try {
|
||||
String path = uri.getPath();
|
||||
int s = path.lastIndexOf('/');
|
||||
String b = (s > 0 ? new String(Base64.decode(path.substring(s + 1), Base64.URL_SAFE)) : null);
|
||||
Uri result = (b == null ? null : Uri.parse(b));
|
||||
changed = (result != null);
|
||||
url = (result == null ? uri : result);
|
||||
} catch (Throwable ex) {
|
||||
Log.i(ex);
|
||||
url = uri;
|
||||
}
|
||||
} else if (uri.getQueryParameterNames().size() == 1) {
|
||||
// Sophos Email Appliance
|
||||
Uri result = null;
|
||||
|
||||
Reference in New Issue
Block a user