mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-03 03:19:24 +01:00
Fix host name URIs
This commit is contained in:
@@ -506,6 +506,11 @@ public class FragmentAccount extends FragmentBase {
|
||||
String password = args.getString("password");
|
||||
String realm = args.getString("realm");
|
||||
|
||||
if (host.contains(":")) {
|
||||
Uri h = Uri.parse(host);
|
||||
host = h.getHost();
|
||||
}
|
||||
|
||||
if (TextUtils.isEmpty(host))
|
||||
throw new IllegalArgumentException(context.getString(R.string.title_no_host));
|
||||
if (TextUtils.isEmpty(port))
|
||||
@@ -763,6 +768,11 @@ public class FragmentAccount extends FragmentBase {
|
||||
boolean pro = Helper.isPro(context);
|
||||
boolean should = args.getBoolean("should");
|
||||
|
||||
if (host.contains(":")) {
|
||||
Uri h = Uri.parse(host);
|
||||
host = h.getHost();
|
||||
}
|
||||
|
||||
if (!should && TextUtils.isEmpty(host))
|
||||
throw new IllegalArgumentException(context.getString(R.string.title_no_host));
|
||||
if (TextUtils.isEmpty(port))
|
||||
|
||||
Reference in New Issue
Block a user