Skip to content

Commit c6a534c

Browse files
mbooth101rwinch
authored andcommitted
SEC-2418: Minor fix to toString method in LdapUserDetailsImpl
1 parent 0b996c6 commit c6a534c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ldap/src/main/java/org/springframework/security/ldap/userdetails/LdapUserDetailsImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public String toString() {
133133
sb.append("CredentialsNonExpired: ").append(this.credentialsNonExpired).append("; ");
134134
sb.append("AccountNonLocked: ").append(this.accountNonLocked).append("; ");
135135

136-
if (this.getAuthorities() != null) {
136+
if (this.getAuthorities() != null && !this.getAuthorities().isEmpty()) {
137137
sb.append("Granted Authorities: ");
138138
boolean first = true;
139139

0 commit comments

Comments
 (0)