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:
parent
201904c13f
commit
fcead4b6b1
1 changed files with 4 additions and 3 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue