Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Hi
In a recent snapshot mirrored from Github for archiva-redback-core, I've found following suspicious code in redback-common/redback-common-ldap/src/main/java/org/apache/archiva/redback/common/ldap/user/LdapUserMapper.java.
156 if ( !StringUtils.isEmpty( user.getFullName() ) ) 157 { 158 if ( user.getFullName() == null ) 159 { 160 addAttrs.put( getUserFullNameAttribute(), user.getFullName() ); 161 } 162 else if ( !user.getFullName().equals( user.getFullName() ) ) 163 { 164 modAttrs.put( getUserFullNameAttribute(), user.getFullName() ); 165 } 166 } 167 168 if ( !StringUtils.isEmpty( user.getEmail() ) ) 169 { 170 if ( user.getEmail() == null ) 171 { 172 addAttrs.put( getEmailAddressAttribute(), user.getEmail() ); 173 } 174 else if ( !user.getEmail().equals( user.getEmail() ) ) 175 { 176 modAttrs.put( getEmailAddressAttribute(), user.getEmail() ); 177 } 178 }
In Line 162, and 174, the conditions should be
user.getFullName().equals( fullNameAttribute )
user.getEmail().equals( emailAttribute )
respectively?
This might not be an issue, but wanted to report just in case. Thanks!