mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 07:01:05 +00:00
Fix host name URIs
This commit is contained in:
parent
041e293ac1
commit
052ea3964b
2 changed files with 15 additions and 0 deletions
|
@ -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))
|
||||
|
|
|
@ -567,6 +567,11 @@ public class FragmentIdentity extends FragmentBase {
|
|||
|
||||
boolean should = args.getBoolean("should");
|
||||
|
||||
if (host.contains(":")) {
|
||||
Uri h = Uri.parse(host);
|
||||
host = h.getHost();
|
||||
}
|
||||
|
||||
if (!should && TextUtils.isEmpty(name))
|
||||
throw new IllegalArgumentException(context.getString(R.string.title_no_name));
|
||||
if (!should && TextUtils.isEmpty(email))
|
||||
|
|
Loading…
Reference in a new issue