Fix issue #430 - Encoding URL does not allow to login

pull/483/head
Thomas 2 years ago
parent f7c7ea98ad
commit f71a73abc8

@ -246,13 +246,14 @@ public class FragmentLoginMain extends Fragment {
URL url = new URL(instance);
host = url.getHost();
} catch (MalformedURLException e) {
host = instance;
e.printStackTrace();
}
try {
currentInstanceLogin = URLEncoder.encode(host, "utf-8");
} catch (UnsupportedEncodingException e) {
Toasty.error(requireActivity(), getString(R.string.client_error), Toast.LENGTH_LONG).show();
currentInstanceLogin = host;
}
String scopes = ((LoginActivity) requireActivity()).requestedAdmin() ? Helper.OAUTH_SCOPES_ADMIN : Helper.OAUTH_SCOPES;
AppsVM appsVM = new ViewModelProvider(requireActivity()).get(AppsVM.class);

Loading…
Cancel
Save