diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2021-04-04 01:21:34 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-03 19:51:34 +0000 |
commit | cf5f0eae3a5dbaf36b17425e4c8d5d8dc43e6866 (patch) | |
tree | e24a9740120142bb36a9b90eddf48caad1a2c7dd /app/src/main/java/dev/msfjarvis | |
parent | c10703db49528c7a0b8831659b2698d3218ba9ee (diff) |
Actively discourage use of git protocol (#1368)
Diffstat (limited to 'app/src/main/java/dev/msfjarvis')
-rw-r--r-- | app/src/main/java/dev/msfjarvis/aps/ui/git/config/GitServerConfigActivity.kt | 9 |
1 files changed, 9 insertions, 0 deletions
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, |