1
0
mirror of synced 2026-05-22 21:33:16 +00:00

Require Locale argument for toLower/toUpperCase usage

This commit is contained in:
Joe Grandja
2024-10-28 07:38:45 -04:00
parent 5f838b0e93
commit a8c4d6cead
24 changed files with 98 additions and 52 deletions
@@ -18,6 +18,7 @@ package org.springframework.security.cas.userdetails;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import org.apereo.cas.client.validation.Assertion;
@@ -73,7 +74,8 @@ public final class GrantedAuthorityFromAssertionAttributesUserDetailsService
}
private SimpleGrantedAuthority createSimpleGrantedAuthority(Object o) {
return new SimpleGrantedAuthority(this.convertToUpperCase ? o.toString().toUpperCase() : o.toString());
return new SimpleGrantedAuthority(
this.convertToUpperCase ? o.toString().toUpperCase(Locale.ROOT) : o.toString());
}
/**