mirror of https://github.com/M66B/FairEmail.git
Decode DHL/NL links
This commit is contained in:
parent
55b2125904
commit
06b34e0597
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue