diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2021-11-03 20:32:53 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-03 20:32:53 +0530 |
commit | 52f4ce06f533ffc4f0eb0031801f52d3ebdab595 (patch) | |
tree | 12173ce09d58edbee7315b106cd8629a19821db0 | |
parent | 2cf3ddf2aadad011f62ecafbbbf939fd0104cb43 (diff) |
Allow unauthenticated HTTPS Git access (#1533)
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | app/src/main/java/dev/msfjarvis/aps/util/settings/GitSettings.kt | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index c77f99b6..f3119fbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ All notable changes to this project will be documented in this file. - Removed Bromite from supported Autofill browsers, since they [disable Android autofill](https://github.com/bromite/bromite/blob/master/FAQ.md#does-bromite-support-the-android-autofill-framework). - Changing password generator parameters now automatically updates the password without needing to press the 'Generate' button again - The app UI was reskinned to match Google's Material You guidelines +- Using HTTPS without authentication is now fully supported, and no longer asks for a username ## [1.13.5] - 2021-07-28 diff --git a/app/src/main/java/dev/msfjarvis/aps/util/settings/GitSettings.kt b/app/src/main/java/dev/msfjarvis/aps/util/settings/GitSettings.kt index 072c1c1c..e6915853 100644 --- a/app/src/main/java/dev/msfjarvis/aps/util/settings/GitSettings.kt +++ b/app/src/main/java/dev/msfjarvis/aps/util/settings/GitSettings.kt @@ -149,7 +149,9 @@ constructor( in listOf("ssh", null) -> Protocol.Ssh else -> return UpdateConnectionSettingsResult.FailedToParseUrl } - if (newAuthMode != AuthMode.None && parsedUrl.user.isNullOrBlank()) + if ((newAuthMode != AuthMode.None && newProtocol != Protocol.Https) && + parsedUrl.user.isNullOrBlank() + ) return UpdateConnectionSettingsResult.MissingUsername(newProtocol) val validHttpsAuth = listOf(AuthMode.None, AuthMode.Password) val validSshAuth = listOf(AuthMode.OpenKeychain, AuthMode.Password, AuthMode.SshKey) |