From cf5f0eae3a5dbaf36b17425e4c8d5d8dc43e6866 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 4 Apr 2021 01:21:34 +0530 Subject: Actively discourage use of git protocol (#1368) --- .../dev/msfjarvis/aps/ui/git/config/GitServerConfigActivity.kt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'app/src/main/java') diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/git/config/GitServerConfigActivity.kt b/app/src/main/java/dev/msfjarvis/aps/ui/git/config/GitServerConfigActivity.kt index 56d9c043..372d5863 100644 --- a/app/src/main/java/dev/msfjarvis/aps/ui/git/config/GitServerConfigActivity.kt +++ b/app/src/main/java/dev/msfjarvis/aps/ui/git/config/GitServerConfigActivity.kt @@ -116,6 +116,15 @@ class GitServerConfigActivity : BaseGitActivity() { return@setOnClickListener } } + if (newUrl.startsWith("git://")) { + BasicBottomSheet.Builder(this) + .setTitleRes(R.string.git_scheme_disallowed_title) + .setMessageRes(R.string.git_scheme_disallowed_message) + .setPositiveButtonClickListener {} + .build() + .show(supportFragmentManager, "SSH_SCHEME_WARNING") + return@setOnClickListener + } when (val updateResult = GitSettings.updateConnectionSettingsIfValid( newAuthMode = newAuthMode, -- cgit v1.2.3