Skip to content
Permalink
Browse files
JENKINS-44640 - Fix NPE checking legacy git SCM URL
Credential tracking is intended to track relevant and valuable use of
the credential, not something as simple as using that credential in a
form validation.

Form validation is valuable for the user experience of the
administrator, but it is not valuable enough to track the credential
use in validating the form.
  • Loading branch information
MarkEWaite committed Jun 2, 2017
1 parent a274696 commit 541c4b6ca10216def62898859264d7f136fca5f1
Showing 1 changed file with 7 additions and 1 deletion.
@@ -187,7 +187,13 @@ public FormValidation doCheckUrl(@AncestorInPath Item item,
.getClient();
StandardCredentials credential = lookupCredentials(item, credentialsId, url);
git.addDefaultCredentials(credential);
CredentialsProvider.track(item, credential);

// Should not track credentials use in any checkURL method, rather should track
// credentials use at the point where the credential is used to perform an
// action (like poll the repository, clone the repository, publish a change
// to the repository).
//
// CredentialsProvider.track(item, credential);

// attempt to connect the provided URL
try {

0 comments on commit 541c4b6

Please sign in to comment.