Do not return stored password on first retry (#1061)

This commit is contained in:
Fabian Henneke 2020-08-27 17:35:26 +02:00 committed by GitHub
parent c848788f05
commit 88b1de2b50
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,9 +48,9 @@ class CredentialFinder(
} }
else -> throw IllegalStateException("Only SshKey and Password connection mode ask for passwords") else -> throw IllegalStateException("Only SshKey and Password connection mode ask for passwords")
} }
val storedCredential = gitOperationPrefs.getString(credentialPref, null)
if (isRetry) if (isRetry)
gitOperationPrefs.edit { remove(credentialPref) } gitOperationPrefs.edit { remove(credentialPref) }
val storedCredential = gitOperationPrefs.getString(credentialPref, null)
if (storedCredential == null) { if (storedCredential == null) {
val layoutInflater = LayoutInflater.from(callingActivity) val layoutInflater = LayoutInflater.from(callingActivity)