Skip to content

Commit

Permalink
Fix NPE in DefaultRoleService.doLoadUsersForDirectoryGroups
Browse files Browse the repository at this point in the history
  • Loading branch information
ghsolomon committed Apr 3, 2024
1 parent 32567ee commit 156d25a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 18.5.2 - 2024-04-03

### 🐞 Bug Fixes

* Fixed bug in `DefaultRoleService.doLoadUsersForDirectoryGroups` where LDAP members with `null`
samAccountNames were not being filtered out, causing `NullPointerExceptions`.

## 18.5.1 - 2024-03-08

### ⚙️ Technical
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ class DefaultRoleService extends BaseRoleService {
ldapService
.lookupGroupMembers(foundGroups)
.each {name, members ->
ret[name] = members.collect(new HashSet()) { it.samaccountname.toLowerCase()}
ret[name] = members.collect(new HashSet()) { it.samaccountname?.toLowerCase() }
// Exclude members without a samaccountname (e.g. email-only contacts within a DL)
ret[name].remove(null)
}

return ret
Expand Down

0 comments on commit 156d25a

Please sign in to comment.