Skip to content

Commit

Permalink
[JENKINS-74842] ClassCastException in `ReverseProxySecurityRealm#lo…
Browse files Browse the repository at this point in the history
…adGroupByGroupname2` (#153)
  • Loading branch information
basil authored Nov 13, 2024
1 parent d99619b commit be58e13
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -785,8 +785,10 @@ public GroupDetails loadGroupByGroupname2(String groupname, boolean fetchMembers
// TODO: obtain a DN instead so that we can obtain multiple attributes later
String searchBase = groupSearchBase != null ? groupSearchBase : "";
String searchFilter = groupSearchFilter != null ? groupSearchFilter : GROUP_SEARCH;
groups = ldapTemplate.searchForSingleAttributeValues(
searchBase, searchFilter, new String[] {groupname}, "cn");
try (SetContextClassLoader sccl = new SetContextClassLoader(ReverseProxySecurityRealm.class)) {

Check warning on line 788 in src/main/java/org/jenkinsci/plugins/reverse_proxy_auth/ReverseProxySecurityRealm.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 788 is not covered by tests
groups = ldapTemplate.searchForSingleAttributeValues(
searchBase, searchFilter, new String[] {groupname}, "cn");
}
} else {
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
Collection<? extends GrantedAuthority> authorities =
Expand Down

0 comments on commit be58e13

Please sign in to comment.