This commit is contained in:
Thomas 2020-11-15 18:09:14 +01:00
parent 3ed5248c2a
commit 8c95554d8e
1 changed files with 8 additions and 0 deletions

View File

@ -149,6 +149,14 @@ public class LoginActivity extends AppCompatActivity {
} catch (MalformedURLException e) { } catch (MalformedURLException e) {
e.printStackTrace(); e.printStackTrace();
} }
} else if (instance.endsWith("/")) {
try {
URL url = new URL("https://" + instance);
instance = url.getHost();
host = instance;
} catch (MalformedURLException e) {
e.printStackTrace();
}
} }
if (!Patterns.WEB_URL.matcher("https://" + instance).matches()) { if (!Patterns.WEB_URL.matcher("https://" + instance).matches()) {
Toasty.error(LoginActivity.this, getString(R.string.not_valide_instance)).show(); Toasty.error(LoginActivity.this, getString(R.string.not_valide_instance)).show();