Branch: refs/heads/master
Home: https://github.com/jenkinsci/git-plugin
Commit: bd0d9cd588d7ba493a0bdc6ad49c1c05e1d997de
https://github.com/jenkinsci/git-plugin/commit/bd0d9cd588d7ba493a0bdc6ad49c1c05e1d997de
Author: Antoine Musso <[email protected]>
Date: 2022-09-01 (Thu, 01 Sep 2022)
Changed paths:
M src/main/java/hudson/plugins/git/GitChangeSet.java
M src/test/java/hudson/plugins/git/GitChangeSetTest.java
Log Message:
-----------
[JENKINS-67981] handle any AuthenticationException
When processing the changelog, if a looked user is disabled in LDAP the
git plugin would throw an `UncheckedExecutionException` with the cause
being `DisabledException`. The unhandled exception would cause a build
failure whenever processing a commit that is determinated to be from a
disabled user.
Jenkins `UserDetailsCache.loadUserByUsername()` receives an
`ExecutionException` which wraps the `AuthenticationException`. The
method inspects the cause, handles instances of
`UsernameNotFoundException` which it throws but ignores any other
`AuthenticationException`.
This introduces a `User` getter to handle any `AuthenticationException`
and throws it instead of the `ExecutionException`. Callers can thus:
try {
user = getUser("someOne");
} catch (AuthenticationException e) {
return User.getUnknown();
}
// Do something with "user"
I have added a test to ensure a `DisabledException` does yield an
unknown user. It only test a single code path though.
Reference: https://phabricator.wikimedia.org/T315897
Commit: a26c735c2cbd0162247543f58322f4d8c973212d
https://github.com/jenkinsci/git-plugin/commit/a26c735c2cbd0162247543f58322f4d8c973212d
Author: Mark Waite <[email protected]>
Date: 2022-09-03 (Sat, 03 Sep 2022)
Changed paths:
M src/main/java/hudson/plugins/git/GitChangeSet.java
M src/test/java/hudson/plugins/git/GitChangeSetTest.java
Log Message:
-----------
Merge pull request #1322 from hashar/handle-authexception
[JENKINS-67981] handle any AuthenticationException
Compare:
https://github.com/jenkinsci/git-plugin/compare/13a61a06a429...a26c735c2cbd
--
You received this message because you are subscribed to the Google Groups
"Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-commits/jenkinsci/git-plugin/push/refs/heads/master/13a61a-a26c73%40github.com.