Merge branch 'stable-3.3'

* stable-3.3:
  Ensure that stored credentials aren't reset too early

Change-Id: Idcd57e12f5fe905952be49edb4f82db6b7ed469f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
Matthias Sohn 2014-04-14 01:20:01 +02:00
commit 7388955319
1 changed files with 2 additions and 2 deletions

View File

@ -472,13 +472,13 @@ private HttpConnection connect(final String service)
throw new TransportException(uri, MessageFormat.format(
JGitText.get().authenticationNotSupported, uri));
CredentialsProvider credentialsProvider = getCredentialsProvider();
if (authAttempts > 1)
credentialsProvider.reset(uri);
if (3 < authAttempts
|| !authMethod.authorize(uri, credentialsProvider)) {
credentialsProvider.reset(uri);
throw new TransportException(uri,
JGitText.get().notAuthorized);
}
credentialsProvider.reset(uri);
authAttempts++;
continue;