From b59faa51d54d3f8ab5bad495f752b48079081d1f Mon Sep 17 00:00:00 2001 From: Douglas Palmer Date: Thu, 22 Jun 2023 13:31:27 -0700 Subject: [PATCH] NPE in getDefaultRequiredActionCaseInsensitively closes #21123 --- .../java/org/keycloak/models/utils/DefaultRequiredActions.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server-spi-private/src/main/java/org/keycloak/models/utils/DefaultRequiredActions.java b/server-spi-private/src/main/java/org/keycloak/models/utils/DefaultRequiredActions.java index 6b6aa1cfc0..aa49046c37 100755 --- a/server-spi-private/src/main/java/org/keycloak/models/utils/DefaultRequiredActions.java +++ b/server-spi-private/src/main/java/org/keycloak/models/utils/DefaultRequiredActions.java @@ -311,6 +311,9 @@ public class DefaultRequiredActions { * of {@link UserModel.RequiredAction} */ public static String getDefaultRequiredActionCaseInsensitively(String providerId) { + if (providerId == null) { + return null; + } String upperCase = providerId.toUpperCase(); if (REQUIRED_ACTIONS.contains(upperCase)) { return upperCase;