From d433ae976a6c50be73214df55b9c460329fe9b46 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sat, 13 Feb 2021 17:40:22 +0200 Subject: [PATCH] profile editor: a bit better check for insecure scheme --- .../ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java b/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java index ed73190e..13a8b55a 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java @@ -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; } -- 2.39.5