Merge pull request #1910 from mposolda/master
KEYCLOAK-2149 Fix possible NPE during migration
This commit is contained in:
commit
9d5356a001
1 changed files with 4 additions and 0 deletions
|
@ -429,6 +429,10 @@ public class DefaultAuthenticationFlows {
|
||||||
if (migrate) {
|
if (migrate) {
|
||||||
// Try to read OTP requirement from browser flow
|
// Try to read OTP requirement from browser flow
|
||||||
AuthenticationFlowModel browserFlow = realm.getBrowserFlow();
|
AuthenticationFlowModel browserFlow = realm.getBrowserFlow();
|
||||||
|
if (browserFlow == null) {
|
||||||
|
browserFlow = realm.getFlowByAlias(DefaultAuthenticationFlows.BROWSER_FLOW);
|
||||||
|
}
|
||||||
|
|
||||||
List<AuthenticationExecutionModel> browserExecutions = new LinkedList<>();
|
List<AuthenticationExecutionModel> browserExecutions = new LinkedList<>();
|
||||||
KeycloakModelUtils.deepFindAuthenticationExecutions(realm, browserFlow, browserExecutions);
|
KeycloakModelUtils.deepFindAuthenticationExecutions(realm, browserFlow, browserExecutions);
|
||||||
for (AuthenticationExecutionModel browserExecution : browserExecutions) {
|
for (AuthenticationExecutionModel browserExecution : browserExecutions) {
|
||||||
|
|
Loading…
Reference in a new issue