1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-18 21:28:54 +00:00

Prevent sanitizing opaque URIs

This commit is contained in:
M66B 2021-09-12 13:37:10 +02:00
parent 201904c13f
commit fcead4b6b1

View file

@ -187,10 +187,11 @@ public class UriHelper {
}
static Uri sanitize(Uri uri) {
boolean changed = false;
if (uri.isOpaque())
return uri;
Uri url;
Uri.Builder builder;
boolean changed = false;
if (uri.getHost() != null &&
uri.getHost().endsWith("safelinks.protection.outlook.com") &&
!TextUtils.isEmpty(uri.getQueryParameter("url"))) {
@ -248,7 +249,7 @@ public class UriHelper {
if (url.isOpaque())
return uri;
builder = url.buildUpon();
Uri.Builder builder = url.buildUpon();
builder.clearQuery();
String host = uri.getHost();