Fix host name URIs

pull/158/head
M66B 5 years ago
parent 041e293ac1
commit 052ea3964b

@ -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…
Cancel
Save