]> git.ktnx.net Git - mobile-ledger.git/commitdiff
profile editor: a bit better check for insecure scheme
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 13 Feb 2021 15:40:22 +0000 (17:40 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 18 Feb 2021 07:19:43 +0000 (07:19 +0000)
app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java

index ed73190e8a4df771e195a7011ebe805a17997966..13a8b55a030e1a3d863e84b5506614f6ef774741 100644 (file)
@@ -496,7 +496,8 @@ public class ProfileDetailFragment extends Fragment {
 
         if (model.getUseAuthentication()) {
             String urlText = model.getUrl();
-            if (urlText.startsWith("http") && !urlText.startsWith("https"))
+            if (urlText.startsWith("http://") ||
+                urlText.length() >= 8 && !urlText.startsWith("https://"))
                 showWarning = true;
         }