Check IdP display name length before capitalizing (#13151)

https://github.com/keycloak/keycloak/issues/13150

Co-authored-by: Stian Thorgersen <stianst@gmail.com>
This commit is contained in:
Jason 2022-08-26 04:16:10 -07:00 committed by GitHub
parent 6bb9d71c1c
commit c6c65ad10b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -149,7 +149,7 @@ public class FreeMarkerEmailTemplateProvider implements EmailTemplateProvider {
String idpDisplayName = brokerContext.getIdpConfig().getDisplayName();
idpAlias = ObjectUtil.capitalize(idpAlias);
if (idpDisplayName != null) {
if (idpDisplayName != null && idpDisplayName.length() > 0) {
idpAlias = ObjectUtil.capitalize(idpDisplayName);
}