mirror of
https://github.com/nicolabs/ldap-plugin.git
synced 2025-09-07 05:14:24 +02:00
fixed a possible race condition (INFRADNA-65)
Originally-Committed-As: a9efb3dac2363331e577b08cbd876f890df303f3
This commit is contained in:
parent
baec8a9e47
commit
7697934967
|
@ -436,10 +436,12 @@ public class LDAPSecurityRealm extends AbstractPasswordBasedSecurityRealm {
|
|||
// intern attributes
|
||||
Attributes v = ldapUser.getAttributes();
|
||||
if (v instanceof BasicAttributes) {// BasicAttributes.equals is what makes the interning possible
|
||||
synchronized (attributesCache) {
|
||||
Attributes vv = (Attributes)attributesCache.get(v);
|
||||
if (vv==null) attributesCache.put(v,vv=v);
|
||||
user.setAttributes(vv);
|
||||
}
|
||||
}
|
||||
|
||||
GrantedAuthority[] extraAuthorities = authoritiesPopulator.getGrantedAuthorities(ldapUser);
|
||||
for (GrantedAuthority extraAuthority : extraAuthorities) {
|
||||
|
|
Loading…
Reference in a new issue