Bläddra i källkod

Merge pull request #1470 from owncloud/bug_7541

Fixes app crash when malformed URL is entered in login view.
David A. Velasco 9 år sedan
förälder
incheckning
89870064dc
1 ändrade filer med 5 tillägg och 1 borttagningar
  1. 5 1
      src/com/owncloud/android/authentication/AuthenticatorActivity.java

+ 5 - 1
src/com/owncloud/android/authentication/AuthenticatorActivity.java

@@ -809,7 +809,11 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
             uri = stripIndexPhpOrAppsFiles(uri, mHostUrlInput);
 
             // Handle internationalized domain names
-            uri = DisplayUtils.convertIdn(uri, true);
+            try {
+                uri = DisplayUtils.convertIdn(uri, true);
+            } catch (IllegalArgumentException ex) {
+                // Let Owncloud library check the error of the malformed URI
+            }
 
             mServerStatusText = R.string.auth_testing_connection;
             mServerStatusIcon = R.drawable.progress_small;